diff options
Diffstat (limited to 'libmm-glib/mm-common-helpers.c')
-rw-r--r-- | libmm-glib/mm-common-helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c index 30f9f94f..0245fd52 100644 --- a/libmm-glib/mm-common-helpers.c +++ b/libmm-glib/mm-common-helpers.c @@ -1738,9 +1738,9 @@ mm_utils_ishexstr (const gchar *hex) gsize len; gsize i; - /* Length not multiple of 2? */ + /* Empty string or length not multiple of 2? */ len = strlen (hex); - if (len % 2 != 0) + if (len == 0 || (len % 2) != 0) return FALSE; for (i = 0; i < len; i++) { |