From 6a8f65936b87c240d31ad9664a45f7ef9fe882b3 Mon Sep 17 00:00:00 2001 From: Prashant Gotarne Date: Mon, 6 Apr 2015 10:18:15 +0530 Subject: [PATCH] memory: add check for writablity in resize Add guard to gst_memory_resize() to make sure the memory to be resized is actually writable. https://bugzilla.gnome.org/show_bug.cgi?id=747392 --- gst/gstmemory.c | 1 + 1 file changed, 1 insertion(+) diff --git a/gst/gstmemory.c b/gst/gstmemory.c index 36259fc..3505ac2 100644 --- a/gst/gstmemory.c +++ b/gst/gstmemory.c @@ -197,6 +197,7 @@ void gst_memory_resize (GstMemory * mem, gssize offset, gsize size) { g_return_if_fail (mem != NULL); + g_return_if_fail (gst_memory_is_writable (mem)); g_return_if_fail (offset >= 0 || mem->offset >= -offset); g_return_if_fail (size + mem->offset + offset <= mem->maxsize); -- 2.7.4