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:
0177ff1
)
parse-launch: don't read past end of string if last character is an escape char
author
Miguel Angel Cabrera Moya
<madmac2501@gmail.com>
Mon, 24 Jan 2011 14:16:37 +0000
(14:16 +0000)
committer
Tim-Philipp Müller
<tim.muller@collabora.co.uk>
Mon, 24 Jan 2011 14:24:32 +0000
(14:24 +0000)
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
gst/parse/types.h
patch
|
blob
|
history
diff --git
a/gst/parse/types.h
b/gst/parse/types.h
index
e938b94
..
7e8b994
100644
(file)
--- a/
gst/parse/types.h
+++ b/
gst/parse/types.h
@@
-75,8
+75,12
@@
gst_parse_unescape (gchar *str)
walk = str;
while (*walk) {
- if (*walk == '\\')
+ if (*walk == '\\')
{
walk++;
+ /* make sure we don't read beyond the end of the string */
+ if (*walk == '\0')
+ break;
+ }
*str = *walk;
str++;
walk++;