mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
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
This commit is contained in:
parent
75e0a3c676
commit
1cd4bd64b0
1 changed files with 1 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue