aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2020-01-29 22:11:45 +0100
committerMichael Niedermayer <michael@niedermayer.cc>2020-07-02 19:55:09 +0200
commitf2c99c2f882e8da3d47cd1a4e4bebecdd25eba4d (patch)
treed11395dbc7f500c143330fc5bcabfa125f90931c
parentcb9ec725c31dc8d3a7e1fe165a8dbdcc1ec4e935 (diff)
downloadffmpeg-f2c99c2f882e8da3d47cd1a4e4bebecdd25eba4d.tar.gz
avcodec/x86/diracdsp: Fix incorrect src addressing in dequant_subband_32()
Fixes: Segfault (not reproducable with asm, which made this hard to debug) Fixes: decoding errors Fixes: 19854/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DIRAC_fuzzer-5729372837511168 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Reviewed-by: Paul B Mahol <onemda@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> (cherry picked from commit 0694b60b7b4892eac1d6e2aca64de9e0cb096486) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/x86/diracdsp.asm3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/x86/diracdsp.asm b/libavcodec/x86/diracdsp.asm
index cc8a26fca5..a18bda113e 100644
--- a/libavcodec/x86/diracdsp.asm
+++ b/libavcodec/x86/diracdsp.asm
@@ -294,8 +294,9 @@ cglobal dequant_subband_32, 7, 7, 4, src, dst, stride, qf, qs, tot_v, tot_h
add srcq, mmsize
add dstq, mmsize
- sub tot_hd, 4
+ sub tot_hq, 4
jg .loop_h
+ lea srcq, [srcq + 4*tot_hq]
add r3, strideq
dec tot_vd