summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2021-06-23 12:11:28 +0200
committerMichael Olbrich <m.olbrich@pengutronix.de>2023-05-12 14:37:06 +0200
commit802b3b98985c93d63f71c5ec027fc0a84bceb6ee (patch)
tree9872cd7af3e1a68322dd6d70afd44f469126fb40
parent9dd6b08fcc1af9401d6eda687af747550221ebac (diff)
downloadgstreamer-802b3b98985c93d63f71c5ec027fc0a84bceb6ee.tar.gz
theoradec: add another assert to check the buffer size
If the buffer has no video meta then the meta is created from the local data. In this case, the other asserts don't actually check anything. So add another one to ensure that the buffer is actually large enough. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4600>
-rw-r--r--subprojects/gst-plugins-base/ext/theora/gsttheoradec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c b/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c
index fa08804ae9..827a7c85a5 100644
--- a/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c
+++ b/subprojects/gst-plugins-base/ext/theora/gsttheoradec.c
@@ -710,6 +710,8 @@ theora_handle_image (GstTheoraDec * dec, th_ycbcr_buffer buf,
g_assert (vmeta->format == dec->output_state->info.finfo->format);
g_assert (vmeta->width == dec->info.frame_width);
g_assert (vmeta->height == dec->info.frame_height);
+ g_assert (gst_buffer_get_size (frame->output_buffer) >=
+ dec->uncropped_info.size);
cmeta = gst_buffer_add_video_crop_meta (frame->output_buffer);