Message ID | 20210504210504.13396-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | 85b883429fb1a8c1be2e39fee510315a92b6cd02 |
Headers | show |
Series | [FFmpeg-devel,1/3] avutil/tx: avoid negative left shifts | expand |
Context | Check | Description |
---|---|---|
andriy/x86_make | success | Make finished |
andriy/x86_make_fate | success | Make fate finished |
andriy/PPC64_make | success | Make finished |
andriy/PPC64_make_fate | success | Make fate finished |
On Tue, May 04, 2021 at 11:05:02PM +0200, Michael Niedermayer wrote: > 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> > --- > libavutil/tx.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) will apply patchset [...]
diff --git a/libavutil/tx.c b/libavutil/tx.c index 8da04e99ca..25adb6b37e 100644 --- a/libavutil/tx.c +++ b/libavutil/tx.c @@ -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)
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> --- libavutil/tx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)