mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
bitstream: Check the result of av_malloc()
This commit is contained in:
parent
3b4fa54866
commit
29c455ce3d
@ -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…
Reference in New Issue
Block a user