queuearray: Fix potential heap overflow when expanding GstQueueArray
authorAdam Doupe <adamdoupe@gmail.com>
Thu, 19 May 2022 04:59:58 +0000 (04:59 +0000)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 15 Jun 2022 15:42:40 +0000 (15:42 +0000)
commite77ed17f15d1b028bdf8e98e4cdd5975ffcc90e3
tree549bd3b658df112a08e562388babe2ad2077f1bf
parentbe11a6e26b62f9822fe382d1b6727ddecb30b3af
queuearray: Fix potential heap overflow when expanding GstQueueArray

Check that elt_size*newsize doesn't overflow when expanding a
GstQueueArray, which has the potential for a heap overwrite.

Co-authored-by: Sebastian Dröge <sebastian@centricular.com>
Fixes https://gitlab.freedesktop.org/gstreamer/gstreamer/-/issues/1232

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2606>
subprojects/gstreamer/libs/gst/base/gstqueuearray.c