Commit 6e78d041 authored by michael's avatar michael

Output buffer overflow.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@13052 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent ae882e2f
...@@ -465,6 +465,11 @@ static int alac_decode_frame(AVCodecContext *avctx, ...@@ -465,6 +465,11 @@ static int alac_decode_frame(AVCodecContext *avctx,
} else } else
outputsamples = alac->setinfo_max_samples_per_frame; 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; *outputsize = outputsamples * alac->bytespersample;
readsamplesize = alac->setinfo_sample_size - (wasted_bytes * 8) + channels - 1; readsamplesize = alac->setinfo_sample_size - (wasted_bytes * 8) + channels - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment