diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2008-05-03 21:06:55 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2008-05-03 21:06:55 +0000 |
commit | f7739f3708f786a0b071d8d8b59331525b0ccfd8 (patch) | |
tree | d99a36c997921afb389cc2040eeef54308846189 /libavcodec/alac.c | |
parent | 494e353179a138b254630f3a208df3aa639d258f (diff) | |
download | ffmpeg-streaming-f7739f3708f786a0b071d8d8b59331525b0ccfd8.zip ffmpeg-streaming-f7739f3708f786a0b071d8d8b59331525b0ccfd8.tar.gz |
Output buffer overflow.
Originally committed as revision 13052 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/alac.c')
-rw-r--r-- | libavcodec/alac.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/alac.c b/libavcodec/alac.c index c5a9b76..65a74d7 100644 --- a/libavcodec/alac.c +++ b/libavcodec/alac.c @@ -465,6 +465,11 @@ static int alac_decode_frame(AVCodecContext *avctx, } else outputsamples = alac->setinfo_max_samples_per_frame; + if(outputsamples > *outputsize / alac->bytespersample){ + av_log(avctx, AV_LOG_ERROR, "sample buffer too small\n"); + return -1; + } + *outputsize = outputsamples * alac->bytespersample; readsamplesize = alac->setinfo_sample_size - (wasted_bytes * 8) + channels - 1; |