Commit 29c455ce authored by Diego Biurrun's avatar Diego Biurrun

bitstream: Check the result of av_malloc()

parent 3b4fa548
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment