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:
fd67f40
)
memory: add check for writablity in resize
author
Prashant Gotarne
<ps.gotarne@samsung.com>
Mon, 6 Apr 2015 04:48:15 +0000
(10:18 +0530)
committer
Tim-Philipp Müller
<tim@centricular.com>
Mon, 6 Apr 2015 12:32:20 +0000
(13:32 +0100)
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
patch
|
blob
|
history
diff --git
a/gst/gstmemory.c
b/gst/gstmemory.c
index
36259fc
..
3505ac2
100644
(file)
--- 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);