mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
videooverlaycomposition: stricter check on input variables
This commit is contained in:
parent
0301aaa30d
commit
dd4836a8d1
1 changed files with 2 additions and 1 deletions
|
@ -691,7 +691,8 @@ gst_video_overlay_rectangle_new_argb (GstBuffer * pixels,
|
|||
height = vmeta->height;
|
||||
|
||||
/* technically ((height-1)*stride)+width might be okay too */
|
||||
g_return_val_if_fail (gst_buffer_get_size (pixels) >= height * width, NULL);
|
||||
g_return_val_if_fail (gst_buffer_get_size (pixels) >= height * width * 4,
|
||||
NULL);
|
||||
g_return_val_if_fail (height > 0 && width > 0, NULL);
|
||||
|
||||
rect = g_slice_new0 (GstVideoOverlayRectangle);
|
||||
|
|
Loading…
Reference in a new issue