From e08c03ed07eddc22d2400a90705c422291863fba Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Sat, 11 Apr 2015 20:44:02 +0900 Subject: [PATCH] gstvalue: reset errno before g_ascii_strtoull call "errno" already has meaningless value before g_ascii_strtoull call. This causes invalid error check without reset. https://bugzilla.gnome.org/show_bug.cgi?id=747690 --- gst/gstvalue.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/gstvalue.c b/gst/gstvalue.c index 21771ebfdf..123e51e9bf 100644 --- a/gst/gstvalue.c +++ b/gst/gstvalue.c @@ -5839,6 +5839,7 @@ gst_value_deserialize_bitmask (GValue * dest, const gchar * s) if (G_UNLIKELY (dest == NULL || !GST_VALUE_HOLDS_BITMASK (dest))) return FALSE; + errno = 0; val = g_ascii_strtoull (s, &endptr, 16); if (val == G_MAXUINT64 && (errno == ERANGE || errno == EINVAL)) return FALSE;