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:
e694f5e
)
bufferlist: avoid reading past the array
author
Wim Taymans
<wim.taymans@collabora.co.uk>
Wed, 23 Nov 2011 16:38:24 +0000
(17:38 +0100)
committer
Wim Taymans
<wim.taymans@collabora.co.uk>
Wed, 23 Nov 2011 17:05:00 +0000
(18:05 +0100)
When the foreach function told us to remove the buffer from the list, decrease
the length of the array or else we might read past the last item in the array.
gst/gstbufferlist.c
patch
|
blob
|
history
diff --git
a/gst/gstbufferlist.c
b/gst/gstbufferlist.c
index
cc5ddf2
..
803545b
100644
(file)
--- a/
gst/gstbufferlist.c
+++ b/
gst/gstbufferlist.c
@@
-210,6
+210,7
@@
gst_buffer_list_foreach (GstBufferList * list, GstBufferListFunc func,
if (buf != buf_ret) {
if (buf_ret == NULL) {
g_array_remove_index (list->array, i);
+ len--;
} else {
g_array_index (list->array, GstBuffer *, i) = buf_ret;
}