aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2017-02-23 15:19:32 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2017-02-25 22:02:23 +0100
commit7e4f32f4e4b93c95dcc872cb844c5548e69f352e (patch)
tree7a192440a5d6a6a6de56abe844b78d5311687b83
parent5804201cbac2de8824013a8294e381e93bbe45f2 (diff)
downloadffmpeg-7e4f32f4e4b93c95dcc872cb844c5548e69f352e.tar.gz
avutil/frame: Disallow zero sized frame side data
There should be no case that needs this and its a potential for creating corner cases Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavutil/frame.c2
1 files changed, 2 insertions, 0 deletions
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));
}