[FFmpeg-cvslog] flashsv: check deflateInit() return value

Michael Niedermayer git at videolan.org
Sun Oct 14 00:14:05 CEST 2012


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Oct 13 22:48:32 2012 +0200| [b3eb4f54c0d091ed518b38a5b90183d0d55fa729] | committer: Michael Niedermayer

flashsv: check deflateInit() return value

Fixes CID703620
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b3eb4f54c0d091ed518b38a5b90183d0d55fa729
---

 libavcodec/flashsv.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/libavcodec/flashsv.c b/libavcodec/flashsv.c
index 8d6f39d..39c5dc8 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