Skip to content
Snippets Groups Projects
Commit 75a2db55 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

avcodec/dpx: Check elements in 12bps planar path

Fixes: null pointer dereference
Fixes: 8946/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_DPX_fuzzer-5078915222601728

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg


Reviewed-by: default avatarCarl Eugen Hoyos <ceffmpeg@gmail.com>
Signed-off-by: default avatarMichael Niedermayer <michael@niedermayer.cc>
parent 46fb150a
No related branches found
No related tags found
No related merge requests found
......@@ -395,12 +395,14 @@ static int decode_frame(AVCodecContext *avctx,
if (elements == 4)
*dst[3]++ = read16(&buf, endian) >> shift & 0xFFF;
} else {
*dst[2]++ = read12in32(&buf, &rgbBuffer,
&n_datum, endian);
if (elements >= 3)
*dst[2]++ = read12in32(&buf, &rgbBuffer,
&n_datum, endian);
*dst[0]++ = read12in32(&buf, &rgbBuffer,
&n_datum, endian);
*dst[1]++ = read12in32(&buf, &rgbBuffer,
&n_datum, endian);
if (elements >= 2)
*dst[1]++ = read12in32(&buf, &rgbBuffer,
&n_datum, endian);
if (elements == 4)
*dst[3]++ = read12in32(&buf, &rgbBuffer,
&n_datum, endian);
......
  • Auri @aurieh

    mentioned in commit 841e1399

    ·

    mentioned in commit 841e1399

    Toggle commit list
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment