diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-14 14:29:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2015-11-14 16:51:30 +0100 |
commit | d61c3d1fca62b2497e4327af3ea50de5f7a8de0f (patch) | |
tree | 01f248b635495077dcb5381436e4fa5b7b27849a /libavcodec | |
parent | ec1f59150d2437ea36baa0b6052ae1cf89b85ca8 (diff) | |
download | ffmpeg-d61c3d1fca62b2497e4327af3ea50de5f7a8de0f.tar.gz |
avcodec/dpx: Move need_align to act per line
Fixes out of array read
Fixes: 61cf123c081ee2bb774d307c75bdb99e/asan_heap-oob_1224f76_5546_bee833ffae73f752b489b9eeaac52db7.dpx
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit c8aaae8e0f1519bc99bd717ea3067c9cfdb68def)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/dpx.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/dpx.c b/libavcodec/dpx.c index 66d8428951..3b45b8eb98 100644 --- a/libavcodec/dpx.c +++ b/libavcodec/dpx.c @@ -348,11 +348,11 @@ static int decode_frame(AVCodecContext *avctx, // For 12 bit, ignore alpha if (elements == 4) buf += 2; - // Jump to next aligned position - buf += need_align; } for (i = 0; i < 3; i++) ptr[i] += p->linesize[i]; + // Jump to next aligned position + buf += need_align; } break; case 16: |