[FFmpeg-devel] [PATCH 4/4] avutil/frame: Disallow zero sized frame side data
Michael Niedermayer
michael at niedermayer.cc
Thu Feb 23 16:19:32 EET 2017
There should be no case that needs this and its a potential for
creating corner cases
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
---
libavutil/frame.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libavutil/frame.c b/libavutil/frame.c
index 8811dcdcfe..69ee240758 100644
--- a/libavutil/frame.c
+++ b/libavutil/frame.c
@@ -668,6 +668,8 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
enum AVFrameSideDataType type,
int size)
{
+ if (size <= 0)
+ return NULL;
return frame_new_side_data(frame, type, av_buffer_alloc(size));
}
--
2.11.0
More information about the ffmpeg-devel
mailing list