diff options
author | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-12 18:25:58 +0000 |
---|---|---|
committer | Vittorio Giovara <vittorio.giovara@gmail.com> | 2014-12-15 15:46:34 +0100 |
commit | 10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0 (patch) | |
tree | ac7a9a7a56eb17e38b2e295613ba5077721acd08 | |
parent | 3c27275c1309190f2d6ed69140b67d014215b6c9 (diff) | |
download | ffmpeg-10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0.tar.gz |
tiff: set the correct return value when check_size() fails
Only one instance affected and solved as other occurences.
-rw-r--r-- | libavcodec/tiffenc.c | 4 |
1 files changed, 3 insertions, 1 deletions
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); |