Browse Source

Prevent NULL dereference when the huffman table is invalid in the 4xm decoder.

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n0.9
Laurent Aimar Michael Niedermayer 14 years ago
parent
commit
4a8ff0636d
1 changed files with 4 additions and 3 deletions
  1. +4
    -3
      libavcodec/4xm.c

+ 4
- 3
libavcodec/4xm.c View File

@@ -601,9 +601,10 @@ static const uint8_t *read_huffman_tables(FourXContext *f, const uint8_t * const
len_tab[j]= len;
}

init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
len_tab , 1, 1,
bits_tab, 4, 4, 0);
if (init_vlc(&f->pre_vlc, ACDC_VLC_BITS, 257,
len_tab , 1, 1,
bits_tab, 4, 4, 0))
return NULL;

return ptr;
}


Loading…
Cancel
Save