diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 00:48:32 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-10-14 00:48:32 +0400 |
commit | b3eb4f54c0d091ed518b38a5b90183d0d55fa729 (patch) | |
tree | 771f58ac2d170402bec180de12cb659ff96e5630 /libavcodec | |
parent | 6581b6cef47e59758573dd790668255ac4eecbd1 (diff) |
flashsv: check deflateInit() return value
Fixes CID703620
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/flashsv.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c index 8d6f39d97a..39c5dc8656 100644 --- a/libavcodec/flashsv.c +++ b/libavcodec/flashsv.c @@ -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; |