aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-10-13 22:48:32 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-10-25 21:19:56 +0200
commite6fa08f14efd51e5d467d2d976a2708b625c3f3a (patch)
treed694b2f27731f11db0fc974b077f2eab32d7b456
parent400b23beab0ab049152e276996a2a405b5542a02 (diff)
downloadffmpeg-e6fa08f14efd51e5d467d2d976a2708b625c3f3a.tar.gz
flashsv: check deflateInit() return value
Fixes CID703620 Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit b3eb4f54c0d091ed518b38a5b90183d0d55fa729) Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/flashsv.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index e57469def5..3f9ec35fd3 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;