Commit 1cd4bd64 authored by Evan Nemerson's avatar Evan Nemerson Committed by Tim-Philipp Müller

queuearray: fix expanding size of queue from 1

Without we would not actually expand and access
memory beyond the allocated region for the array.

https://bugzilla.gnome.org/show_bug.cgi?id=731349
parent 75e0a3c6
......@@ -145,7 +145,7 @@ gst_queue_array_push_tail (GstQueueArray * array, gpointer data)
/* Check if we need to make room */
if (G_UNLIKELY (array->length == array->size)) {
/* newsize is 50% bigger */
guint newsize = (3 * array->size) / 2;
guint newsize = MAX ((3 * array->size) / 2, array->size + 1);
/* copy over data */
if (array->tail != 0) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment