[FFmpeg-cvslog] tiff: set the correct return value when check_size() fails

Vittorio Giovara git at videolan.org
Mon Dec 15 22:28:16 CET 2014


ffmpeg | branch: master | Vittorio Giovara <vittorio.giovara at gmail.com> | Fri Dec 12 18:25:58 2014 +0000| [10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0] | committer: Vittorio Giovara

tiff: set the correct return value when check_size() fails

Only one instance affected and solved as other occurences.

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

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

diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index e17208a..f273492 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -319,8 +319,10 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt,
     s->buf       = &ptr;
     s->buf_size  = pkt->size;
 
-    if (check_size(s, 8))
+    if (check_size(s, 8)) {
+        ret = AVERROR(EINVAL);
         goto fail;
+    }
 
     // write header
     bytestream_put_le16(&ptr, 0x4949);



More information about the ffmpeg-cvslog mailing list