Commit b3eb4f54 authored by Michael Niedermayer's avatar Michael Niedermayer

flashsv: check deflateInit() return value

Fixes CID703620
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 6581b6ce
......@@ -138,7 +138,8 @@ static int flashsv2_prime(FlashSVContext *s, uint8_t *src,
s->zstream.avail_out = s->block_size * 3;
inflate(&s->zstream, Z_SYNC_FLUSH);
deflateInit(&zs, 0);
if (deflateInit(&zs, 0) != Z_OK)
return -1;
zs.next_in = s->tmpblock;
zs.avail_in = s->block_size * 3 - s->zstream.avail_out;
zs.next_out = s->deflate_block;
......
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