1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

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>
This commit is contained in:
Michael Niedermayer 2013-10-31 23:29:01 +01:00
parent 8b3964ecd1
commit 73d887733d

View File

@ -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;