libmm-glib,common-helpers: make hexstr2bin() return a GError

This util method checks whether the input string is a valid hex
string, so make sure we return a GError on failure.
This commit is contained in:
Aleksander Morgado
2021-02-23 11:35:11 +00:00
parent dbdf67e9f7
commit 657cabcfce
11 changed files with 90 additions and 153 deletions
+1 -1
View File
@@ -169,7 +169,7 @@ mm_modem_charset_hex_to_utf8 (const gchar *src,
iconv_from = charset_iconv_from (charset);
g_return_val_if_fail (iconv_from != NULL, FALSE);
unconverted = mm_utils_hexstr2bin (src, &unconverted_len);
unconverted = mm_utils_hexstr2bin (src, &unconverted_len, NULL);
if (!unconverted)
return NULL;