diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-18 10:32:58 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-05-19 11:47:09 +0300 |
commit | fbdb3aa179939616bc7fb26e3fe386b85b58e467 (patch) | |
tree | ec2c7bd2651e7878350d9324bd63f28b09412841 /libavcodec/v210dec.c | |
parent | c61d16cf3b815388c076c2a35b5c91e84b45d7be (diff) |
avcodec/v210dec: Fix alignment check for AVX2
Fixes: "null pointer dereference" (actually misaligned access but the tools seem not to support this)
Fixes: 14551/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_V210_fuzzer-5088609952071680
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec/v210dec.c')
-rw-r--r-- | libavcodec/v210dec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/v210dec.c b/libavcodec/v210dec.c index bc1e1d34ff..5a33d8c089 100644 --- a/libavcodec/v210dec.c +++ b/libavcodec/v210dec.c @@ -104,7 +104,7 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *got_frame, && avpkt->size - 64 >= stride * avctx->height) psrc += 64; - aligned_input = !((uintptr_t)psrc & 0xf) && !(stride & 0xf); + aligned_input = !((uintptr_t)psrc & 0x1f) && !(stride & 0x1f); if (aligned_input != s->aligned_input) { s->aligned_input = aligned_input; ff_v210dec_init(s); |