diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-31 23:29:01 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-11-01 19:49:05 +0100 |
commit | 73d887733dc2ccb5d570615a753d5c44c3f1d9a4 (patch) | |
tree | fbb06d0640996407df83603e09bde599ff603887 /libavcodec/tiff_common.c | |
parent | 8b3964ecd1bfc7ac65ae91013b404beb7d2c875a (diff) | |
download | ffmpeg-73d887733dc2ccb5d570615a753d5c44c3f1d9a4.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>
Diffstat (limited to 'libavcodec/tiff_common.c')
-rw-r--r-- | libavcodec/tiff_common.c | 2 |
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; |