10l, protect malloc overflow
Originally committed as revision 12205 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
b8d3daca62
commit
9c7fd997f7
1 changed files with 2 additions and 0 deletions
|
|
@ -368,6 +368,8 @@ static int aiff_read_header(AVFormatContext *s,
|
|||
url_fskip(pb, size - 8);
|
||||
break;
|
||||
case MKTAG('w', 'a', 'v', 'e'):
|
||||
if ((uint64_t)size > (1<<30))
|
||||
return -1;
|
||||
st->codec->extradata = av_mallocz(size + FF_INPUT_BUFFER_PADDING_SIZE);
|
||||
if (!st->codec->extradata)
|
||||
return AVERROR(ENOMEM);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue