mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
aacenc: fix out of array writes
The value used in allocation is based on a estimate of the maximum size of the spectral coefficients multiplied with 2 and rounded up. The exact or a tighter limit should be found and used instead. But this issue shouldnt be left open until someone works on that. Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
60b433d905
commit
d56834201b
@ -576,7 +576,7 @@ static int aac_encode_frame(AVCodecContext *avctx, AVPacket *avpkt,
|
|||||||
}
|
}
|
||||||
start_ch += chans;
|
start_ch += chans;
|
||||||
}
|
}
|
||||||
if ((ret = ff_alloc_packet2(avctx, avpkt, 768 * s->channels))) {
|
if ((ret = ff_alloc_packet2(avctx, avpkt, 8192 * s->channels))) {
|
||||||
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
|
av_log(avctx, AV_LOG_ERROR, "Error getting output packet\n");
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user