1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-08-10 06:10:52 +02:00

bitstream: Check the result of av_malloc()

This commit is contained in:
Diego Biurrun
2013-10-15 14:34:55 +02:00
parent 3b4fa54866
commit 29c455ce3d

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;