avcodec/hcom: Check the root entry and the right entries
authorMichael Niedermayer <michael@niedermayer.cc>
Mon, 7 Oct 2019 14:56:11 +0000 (16:56 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Thu, 24 Oct 2019 22:22:33 +0000 (00:22 +0200)
commit4834ec926aa569cf25c797e22643d4735880b7a1
treee8fdcf40204758d7e82709a8d14ada9e9d0bb677
parentb63fbc19c09d0b42da4f83c21fcf362d6ed7c545
avcodec/hcom: Check the root entry and the right entries

Fixes: Segfault
Fixes: 17991/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_HCOM_fuzzer-5647235349479424

Also fixes related memleak

Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/hcom.c