about summary refs log tree commit diff
path: root/shared/nm-glib-aux/nm-shared-utils.c
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2020-08-31 11:11:14 +0200
committerSebastien Bacher <seb128@ubuntu.com>2020-08-31 11:11:14 +0200
commitbbb262bfd5200313834db8fb36b7fb20aa0913b5 (patch)
tree70fad3f1f44bb7299dd1f5f376a6b8483a023136 /shared/nm-glib-aux/nm-shared-utils.c
parent6e17a2e7ad9453c0afe34dab0e6768ad8ee447c2 (diff)
parent9d722f3d3492e31c0b3e4bcba603ffd65309c621 (diff)
Merge remote-tracking branch 'salsa/debian/master' into ubuntu/master
Diffstat (limited to 'shared/nm-glib-aux/nm-shared-utils.c')
-rw-r--r--shared/nm-glib-aux/nm-shared-utils.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/shared/nm-glib-aux/nm-shared-utils.c b/shared/nm-glib-aux/nm-shared-utils.c
index 681b4dd1..3d1b0098 100644
--- a/shared/nm-glib-aux/nm-shared-utils.c
+++ b/shared/nm-glib-aux/nm-shared-utils.c
@@ -4194,7 +4194,10 @@ nm_utils_hexstr2bin_alloc (const char *hexstr,
 	guint8 *buffer;
 	gsize buffer_len, len;
 
-	g_return_val_if_fail (hexstr, NULL);
+	if (G_UNLIKELY (!hexstr)) {
+		NM_SET_OUT (out_len, 0);
+		g_return_val_if_fail (hexstr, NULL);
+	}
 
 	nm_assert (required_len > 0 || out_len);