aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-31 23:29:01 +0100
committerCarl Eugen Hoyos <cehoyos@ag.or.at>2013-11-18 14:21:37 +0100
commit3193b85be33347f5cd48f0978092c9b53181defa (patch)
treeea035433bfa9d87fa060574804d3e297f855361c
parent5c8845a55478c4963e663e288f7ce6009780a49a (diff)
downloadffmpeg-3193b85be33347f5cd48f0978092c9b53181defa.tar.gz
avcodec/tiff_common: allow count = 0 in ff_tadd_bytes_metadata()
Fixes Ticket3103 Reviewed-by: Thilo Borgmann <thilo.borgmann@mail.de> Signed-off-by: Michael Niedermayer <michaelni@gmx.at> (cherry picked from commit 73d887733dc2ccb5d570615a753d5c44c3f1d9a4)
-rw-r--r--libavcodec/tiff_common.c2
1 files changed, 1 insertions, 1 deletions
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;