Browse Source

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>
tags/n3.3
Michael Niedermayer 9 years ago
parent
commit
7e4f32f4e4
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavutil/frame.c

+ 2
- 0
libavutil/frame.c View File

@@ -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));
}


Loading…
Cancel
Save