summaryrefslogtreecommitdiff
path: root/libavcodec/tiffenc.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-15 22:12:40 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-15 22:14:14 +0100
commit4cffcbc809d24d29b5bc9e913402ea1faf2986a8 (patch)
treeeedcb334ae8ae0cccac9679a4aa4bb06fdb7e76a /libavcodec/tiffenc.c
parent07b4d4b1a282d1968e0977bc34ed303ea26b1246 (diff)
parent10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0 (diff)
Merge commit '10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0'
* commit '10d4c5e55e5b23e165aa4c7723073ebe2c2e7da0': tiff: set the correct return value when check_size() fails Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiffenc.c')
-rw-r--r--libavcodec/tiffenc.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/libavcodec/tiffenc.c b/libavcodec/tiffenc.c
index 782a2fbfd7..5819d38d72 100644
--- a/libavcodec/tiffenc.c
+++ b/libavcodec/tiffenc.c
@@ -334,8 +334,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);