mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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
This commit is contained in:
parent
fd67f40e4d
commit
6a8f65936b
1 changed files with 1 additions and 0 deletions
|
@ -197,6 +197,7 @@ void
|
||||||
gst_memory_resize (GstMemory * mem, gssize offset, gsize size)
|
gst_memory_resize (GstMemory * mem, gssize offset, gsize size)
|
||||||
{
|
{
|
||||||
g_return_if_fail (mem != NULL);
|
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 (offset >= 0 || mem->offset >= -offset);
|
||||||
g_return_if_fail (size + mem->offset + offset <= mem->maxsize);
|
g_return_if_fail (size + mem->offset + offset <= mem->maxsize);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue