From 10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0 Mon Sep 17 00:00:00 2001 From: Vittorio Giovara Date: Fri, 12 Dec 2014 18:25:58 +0000 Subject: tiff: set the correct return value when check_size() fails Only one instance affected and solved as other occurences. --- libavcodec/tiffenc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'libavcodec/tiffenc.c') diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c index e17208ad43..f2734922f2 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); -- cgit v1.2.3