projects
/
platform
/
upstream
/
gstreamer.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9f5f906
)
flvdemux: Handle empty metadata strings
author
Edward Hervey
<edward@centricular.com>
Wed, 20 May 2020 08:45:16 +0000
(10:45 +0200)
committer
Edward Hervey
<bilboed@bilboed.com>
Wed, 20 May 2020 08:48:06 +0000
(10:48 +0200)
g_utf8_validate() errors out on empty string. But empty strings are valid,
so only check if they're not
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/596>
gst/flv/gstflvdemux.c
patch
|
blob
|
history
diff --git
a/gst/flv/gstflvdemux.c
b/gst/flv/gstflvdemux.c
index 7cfe63fd60d3b58e788b3a6e0ac1b33a5018a0ba..16356d472849213783ef552541ddf98d0716d6b8 100644
(file)
--- a/
gst/flv/gstflvdemux.c
+++ b/
gst/flv/gstflvdemux.c
@@
-202,7
+202,8
@@
FLV_GET_STRING (GstByteReader * reader)
}
memcpy (string, str, string_size);
- if (!g_utf8_validate (string, string_size, NULL)) {
+ /* Check utf-8 validity if it's not an empty string */
+ if (string[0] && !g_utf8_validate (string, string_size, NULL)) {
g_free (string);
return NULL;
}