mirror of
https://git.videolan.org/git/ffmpeg.git
synced 2024-09-14 11:03:33 +02:00
avcodec/smacker: use av_mallocz_array()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
9b888fb159
commit
683b6e3183
@ -271,7 +271,7 @@ static int smacker_decode_header_tree(SmackVContext *smk, GetBitContext *gb, int
|
|||||||
huff.length = ((size + 3) >> 2) + 4;
|
huff.length = ((size + 3) >> 2) + 4;
|
||||||
huff.maxlength = 0;
|
huff.maxlength = 0;
|
||||||
huff.current = 0;
|
huff.current = 0;
|
||||||
huff.values = av_mallocz(huff.length * sizeof(int));
|
huff.values = av_mallocz_array(huff.length, sizeof(int));
|
||||||
if (!huff.values) {
|
if (!huff.values) {
|
||||||
err = AVERROR(ENOMEM);
|
err = AVERROR(ENOMEM);
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
Reference in New Issue
Block a user