mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-28 18:32:22 +00:00
avcodec/movtextdec: check that ftab has been allocated before dereferencing it
Fixes potential null pointer dereference on deallocation Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
2e7a684e72
commit
ae413a48e6
@ -93,9 +93,11 @@ static void mov_text_cleanup(MovTextContext *m)
|
||||
static void mov_text_cleanup_ftab(MovTextContext *m)
|
||||
{
|
||||
int i;
|
||||
for(i = 0; i < m->count_f; i++) {
|
||||
av_freep(&m->ftab[i]->font);
|
||||
av_freep(&m->ftab[i]);
|
||||
if (m->ftab) {
|
||||
for(i = 0; i < m->count_f; i++) {
|
||||
av_freep(&m->ftab[i]->font);
|
||||
av_freep(&m->ftab[i]);
|
||||
}
|
||||
}
|
||||
av_freep(&m->ftab);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user