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:
ef55c8a
)
samiparse: Check that the string has a non-zero length before overwriting the last...
author
Sebastian Dröge
<sebastian@centricular.com>
Fri, 20 Jan 2017 06:02:38 +0000
(08:02 +0200)
committer
Sebastian Dröge
<sebastian@centricular.com>
Fri, 20 Jan 2017 06:03:33 +0000
(08:03 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=777502
gst/subparse/samiparse.c
patch
|
blob
|
history
diff --git
a/gst/subparse/samiparse.c
b/gst/subparse/samiparse.c
index
517e959
..
377c6d7
100644
(file)
--- a/
gst/subparse/samiparse.c
+++ b/
gst/subparse/samiparse.c
@@
-504,7
+504,8
@@
html_context_handle_element (HtmlContext * ctxt,
}
length = strlen (attr_value);
- if (attr_value[length - 1] == '"' || attr_value[length - 1] == '\'') {
+ if (length > 0 && (attr_value[length - 1] == '"'
+ || attr_value[length - 1] == '\'')) {
attr_value[length - 1] = '\0';
}