From 73d887733dc2ccb5d570615a753d5c44c3f1d9a4 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 31 Oct 2013 23:29:01 +0100 Subject: [PATCH] avcodec/tiff_common: allow count = 0 in ff_tadd_bytes_metadata() Fixes Ticket3103 Reviewed-by: Thilo Borgmann Signed-off-by: Michael Niedermayer --- libavcodec/tiff_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/tiff_common.c b/libavcodec/tiff_common.c index 6a10d71743..ce91219150 100644 --- a/libavcodec/tiff_common.c +++ b/libavcodec/tiff_common.c @@ -219,7 +219,7 @@ int ff_tadd_bytes_metadata(int count, const char *name, const char *sep, char *ap; int i; - if (count >= INT_MAX / sizeof(int8_t) || count <= 0) + if (count >= INT_MAX / sizeof(int8_t) || count < 0) return AVERROR_INVALIDDATA; if (bytestream2_get_bytes_left(gb) < count * sizeof(int8_t)) return AVERROR_INVALIDDATA;