mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
wmaenc: require a large enough output buffer to prevent overwrites
The maximum theoretical frame size is around 17000 bytes. Although in practice it will generally be much smaller, we require a larger buffer just to be safe. CC: libav-stable@libav.org
This commit is contained in:
parent
1ec075cfec
commit
dfc4fdedf8
@ -365,6 +365,11 @@ static int encode_superframe(AVCodecContext *avctx,
|
||||
}
|
||||
}
|
||||
|
||||
if (buf_size < 2 * MAX_CODED_SUPERFRAME_SIZE) {
|
||||
av_log(avctx, AV_LOG_ERROR, "output buffer size is too small\n");
|
||||
return AVERROR(EINVAL);
|
||||
}
|
||||
|
||||
#if 1
|
||||
total_gain= 128;
|
||||
for(i=64; i; i>>=1){
|
||||
|
Loading…
Reference in New Issue
Block a user