Message ID | 20240305045149.199832-1-gseanmcg@gmail.com |
---|---|
State | New |
Headers | show |
Series | [FFmpeg-devel] aacenc_pred: prevent UB in ff_aac_adjust_common_pred() | expand |
Context | Check | Description |
---|---|---|
yinshiyou/make_loongarch64 | success | Make finished |
yinshiyou/make_fate_loongarch64 | success | Make fate finished |
andriy/make_x86 | success | Make finished |
andriy/make_fate_x86 | success | Make fate finished |
diff --git a/libavcodec/aacenc_pred.c b/libavcodec/aacenc_pred.c index a486c44d42..c5b8aa9665 100644 --- a/libavcodec/aacenc_pred.c +++ b/libavcodec/aacenc_pred.c @@ -164,7 +164,7 @@ void ff_aac_adjust_common_pred(AACEncContext *s, ChannelElement *cpe) for (w = 0; w < sce0->ics.num_windows; w += sce0->ics.group_len[w]) { start = 0; - for (g = 0; g < sce0->ics.num_swb; g++) { + for (g = 0; g < pmax; g++) { int sfb = w*16+g; int sum = sce0->ics.prediction_used[sfb] + sce1->ics.prediction_used[sfb]; float ener0 = 0.0f, ener1 = 0.0f, ener01 = 0.0f;