avcodec/aacsbr_fixed: Fix division by zero in sbr_gain_calc()

Fixes: 3642/clusterfuzz-testcase-minimized-5443853801750528

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
pull/272/head
Michael Niedermayer 7 years ago
parent e34fe61bf4
commit 7d1dec4668
  1. 1
      libavcodec/aacsbr_fixed.c

@ -433,6 +433,7 @@ static void sbr_gain_calc(AACContext *ac, SpectralBandReplication *sbr,
av_add_sf(FLOAT_1, sbr->e_curr[e][m]), av_add_sf(FLOAT_1, sbr->e_curr[e][m]),
av_add_sf(FLOAT_1, sbr->q_mapped[e][m])))); av_add_sf(FLOAT_1, sbr->q_mapped[e][m]))));
} }
sbr->gain[e][m] = av_add_sf(sbr->gain[e][m], FLOAT_MIN);
} }
for (m = sbr->f_tablelim[k] - sbr->kx[1]; m < sbr->f_tablelim[k + 1] - sbr->kx[1]; m++) { for (m = sbr->f_tablelim[k] - sbr->kx[1]; m < sbr->f_tablelim[k + 1] - sbr->kx[1]; m++) {
sum[0] = av_add_sf(sum[0], sbr->e_origmapped[e][m]); sum[0] = av_add_sf(sum[0], sbr->e_origmapped[e][m]);

Loading…
Cancel
Save