mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-26 17:32:06 +00:00
avcodec/mpegaudioenc_template: Fix integer overflow
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
4615ff0d61
commit
c6902f96d7
@ -708,7 +708,7 @@ static void encode_frame(MpegAudioContext *s,
|
||||
q1 += 1 << P;
|
||||
if (q1 < 0)
|
||||
q1 = 0;
|
||||
q[m] = (unsigned)(q1 * steps) >> (P + 1);
|
||||
q[m] = (q1 * (unsigned)steps) >> (P + 1);
|
||||
}
|
||||
#endif
|
||||
if (q[m] >= steps)
|
||||
|
Loading…
Reference in New Issue
Block a user