Browse Source

avcodec/hevc: clear HEVClc when its deallocated in hevc_decode_free()

Fixes reading freed memory
Fixes: asan_heap-uaf_1abf8ef_3987_NUT_A_ericsson_4.bit
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.2-rc1
Michael Niedermayer 12 years ago
parent
commit
21a2fb7e05
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/hevc.c

+ 2
- 0
libavcodec/hevc.c View File

@@ -2728,6 +2728,8 @@ static av_cold int hevc_decode_free(AVCodecContext *avctx)
av_freep(&s->sList[i]);
}
}
if (s->HEVClc == s->HEVClcList[0])
s->HEVClc = NULL;
av_freep(&s->HEVClcList[0]);

for (i = 0; i < s->nals_allocated; i++)


Loading…
Cancel
Save