mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-25 09:40:37 +00:00
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
This commit is contained in:
parent
7d3d4503a1
commit
e08c03ed07
1 changed files with 1 additions and 0 deletions
|
@ -5839,6 +5839,7 @@ gst_value_deserialize_bitmask (GValue * dest, const gchar * s)
|
||||||
if (G_UNLIKELY (dest == NULL || !GST_VALUE_HOLDS_BITMASK (dest)))
|
if (G_UNLIKELY (dest == NULL || !GST_VALUE_HOLDS_BITMASK (dest)))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
val = g_ascii_strtoull (s, &endptr, 16);
|
val = g_ascii_strtoull (s, &endptr, 16);
|
||||||
if (val == G_MAXUINT64 && (errno == ERANGE || errno == EINVAL))
|
if (val == G_MAXUINT64 && (errno == ERANGE || errno == EINVAL))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
Loading…
Reference in a new issue