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 73d887733d
)
This commit is contained in:

committed by
Carl Eugen Hoyos

parent
5c8845a554
commit
3193b85be3
@@ -219,7 +219,7 @@ int ff_tadd_bytes_metadata(int count, const char *name, const char *sep,
|
|||||||
char *ap;
|
char *ap;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (count >= INT_MAX / sizeof(int8_t) || count <= 0)
|
if (count >= INT_MAX / sizeof(int8_t) || count < 0)
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
if (bytestream2_get_bytes_left(gb) < count * sizeof(int8_t))
|
if (bytestream2_get_bytes_left(gb) < count * sizeof(int8_t))
|
||||||
return AVERROR_INVALIDDATA;
|
return AVERROR_INVALIDDATA;
|
||||||
|
Reference in New Issue
Block a user