Mercurial > libavformat.hg
changeset 3075:b273d958cf52 libavformat
10l, protect malloc overflow
author | bcoudurier |
---|---|
date | Mon, 25 Feb 2008 12:38:37 +0000 |
parents | 815859771e8b |
children | 79fcc3c853d4 |
files | aiff.c |
diffstat | 1 files changed, 2 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/aiff.c Mon Feb 25 12:29:34 2008 +0000 +++ b/aiff.c Mon Feb 25 12:38:37 2008 +0000 @@ -368,6 +368,8 @@ 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);