Browse Source

bitstream: Check the result of av_malloc()

tags/n2.1
Diego Biurrun 12 years ago
parent
commit
29c455ce3d
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      libavcodec/bitstream.c

+ 2
- 0
libavcodec/bitstream.c View File

@@ -283,6 +283,8 @@ int ff_init_vlc_sparse(VLC *vlc, int nb_bits, int nb_codes,
av_dlog(NULL, "build table nb_codes=%d\n", nb_codes);

buf = av_malloc((nb_codes + 1) * sizeof(VLCcode));
if (!buf)
return AVERROR(ENOMEM);

assert(symbols_size <= 2 || !symbols);
j = 0;


Loading…
Cancel
Save