[FFmpeg-cvslog] flashsv: check deflateInit() return value
Michael Niedermayer
git at videolan.org
Thu Oct 25 21:29:20 CEST 2012
ffmpeg | branch: release/0.10 | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 22:48:32 2012 +0200| [e6fa08f14efd51e5d467d2d976a2708b625c3f3a] | committer: Michael Niedermayer
flashsv: check deflateInit() return value
Fixes CID703620
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit b3eb4f54c0d091ed518b38a5b90183d0d55fa729)
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=e6fa08f14efd51e5d467d2d976a2708b625c3f3a
---
libavcodec/flashsv.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index e57469d..3f9ec35 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;
More information about the ffmpeg-cvslog
mailing list