Skip to content
Snippets Groups Projects
Commit 7e4f32f4 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

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: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 5804201c
No related branches found
No related tags found
No related merge requests found
...@@ -668,6 +668,8 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame, ...@@ -668,6 +668,8 @@ AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
enum AVFrameSideDataType type, enum AVFrameSideDataType type,
int size) int size)
{ {
if (size <= 0)
return NULL;
return frame_new_side_data(frame, type, av_buffer_alloc(size)); return frame_new_side_data(frame, type, av_buffer_alloc(size));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment