avutil/tx: avoid negative left shifts
Fixes: left shift of negative value -1 Fixes: 33736/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SIREN_fuzzer-6657785795313664 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c067d20177
commit
85b883429f
@ -97,9 +97,9 @@ static inline int split_radix_permutation(int i, int m, int inverse)
|
||||
if (m <= 1)
|
||||
return i & 1;
|
||||
if (!(i & m))
|
||||
return (split_radix_permutation(i, m, inverse) << 1);
|
||||
return split_radix_permutation(i, m, inverse) * 2;
|
||||
m >>= 1;
|
||||
return (split_radix_permutation(i, m, inverse) << 2) + 1 - 2*(!(i & m) ^ inverse);
|
||||
return split_radix_permutation(i, m, inverse) * 4 + 1 - 2*(!(i & m) ^ inverse);
|
||||
}
|
||||
|
||||
int ff_tx_gen_ptwo_revtab(AVTXContext *s, int invert_lookup)
|
||||
|
Loading…
x
Reference in New Issue
Block a user