avcodec/mpegaudiodec_template: Make l3_unscale() work with e=0
Fixes undefined behavior
Fixes: 830/clusterfuzz-testcase-6253175327686656
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/targets/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 8ebed703f1)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
b34ca8295d
commit
17624e4156
1 changed files with 1 additions and 1 deletions
|
|
@ -252,7 +252,7 @@ static inline int l3_unscale(int value, int exponent)
|
|||
#endif
|
||||
if (e > 31)
|
||||
return 0;
|
||||
m = (m + (1 << (e - 1))) >> e;
|
||||
m = (m + ((1U << e)>>1)) >> e;
|
||||
|
||||
return m;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue