- shift = 22 - in[m ].exp;
- round = 1 << (shift-1);
- out[2*m ] += (in[m ].mant * A + round) >> shift;
+ int shift2;
+ shift = 22 - in[m ].exp;
+ shift2= 22 - in[m+1].exp;
+ if (shift < 1 || shift2 < 1) {
+ av_log(NULL, AV_LOG_ERROR, "Overflow in sbr_hf_assemble, shift=%d,%d\n", shift, shift2);
+ return;
+ }
+ if (shift < 32) {
+ round = 1 << (shift-1);
+ out[2*m ] += (in[m ].mant * A + round) >> shift;
+ }