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:
@ -93,9 +93,11 @@ static void mov_text_cleanup(MovTextContext *m)
|
|||||||
static void mov_text_cleanup_ftab(MovTextContext *m)
|
static void mov_text_cleanup_ftab(MovTextContext *m)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = 0; i < m->count_f; i++) {
|
if (m->ftab) {
|
||||||
av_freep(&m->ftab[i]->font);
|
for(i = 0; i < m->count_f; i++) {
|
||||||
av_freep(&m->ftab[i]);
|
av_freep(&m->ftab[i]->font);
|
||||||
|
av_freep(&m->ftab[i]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
av_freep(&m->ftab);
|
av_freep(&m->ftab);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user