Code: static int mpeg4_decode_profile_level(MpegEncContext *s, GetBitContext *gb)
 {
 
    s->avctx->profile = get_bits(gb, 4);
    s->avctx->level   = get_bits(gb, 4);
 
    if (s->avctx->profile == 0 && s->avctx->level == 8) {
        s->avctx->level = 0;
     }
 
     return 0;
}

Vulnerability Type: DoS 
CWE ID: CWE-476
Summary: In FFmpeg 4.0.1, due to a missing check of a profile value before setting it, the ff_mpeg4_decode_picture_header function in libavcodec/mpeg4videodec.c may trigger a NULL pointer dereference while converting a crafted AVI file to MPEG4, leading to a denial of service.
Commit Message: avcodec/mpeg4videodec: Check read profile before setting it

Fixes: null pointer dereference
Fixes: ffmpeg_crash_7.avi

Found-by: Thuan Pham, Marcel Böhme, Andrew Santosa and Alexandru Razvan Caciulescu with AFLSmart
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>