mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-04-14 00:58:38 +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);
|
av_dlog(NULL, "build table nb_codes=%d\n", nb_codes);
|
||||||
|
|
||||||
buf = av_malloc((nb_codes + 1) * sizeof(VLCcode));
|
buf = av_malloc((nb_codes + 1) * sizeof(VLCcode));
|
||||||
|
if (!buf)
|
||||||
|
return AVERROR(ENOMEM);
|
||||||
|
|
||||||
assert(symbols_size <= 2 || !symbols);
|
assert(symbols_size <= 2 || !symbols);
|
||||||
j = 0;
|
j = 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user