mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
parse-launch: don't read past end of string if last character is an escape char
When the last character of a property value is a backslash the unescaping code reads one byte pass the end of the string. https://bugzilla.gnome.org/show_bug.cgi?id=639674
This commit is contained in:
parent
0177ff171a
commit
d709f569ba
1 changed files with 5 additions and 1 deletions
|
@ -75,8 +75,12 @@ gst_parse_unescape (gchar *str)
|
||||||
walk = str;
|
walk = str;
|
||||||
|
|
||||||
while (*walk) {
|
while (*walk) {
|
||||||
if (*walk == '\\')
|
if (*walk == '\\') {
|
||||||
walk++;
|
walk++;
|
||||||
|
/* make sure we don't read beyond the end of the string */
|
||||||
|
if (*walk == '\0')
|
||||||
|
break;
|
||||||
|
}
|
||||||
*str = *walk;
|
*str = *walk;
|
||||||
str++;
|
str++;
|
||||||
walk++;
|
walk++;
|
||||||
|
|
Loading…
Reference in a new issue