[FFmpeg-devel] [PATCH] avcodec/tiff_common: allow count = 0 in ff_tadd_bytes_metadata()
Michael Niedermayer
michaelni at gmx.at
Thu Oct 31 23:35:53 CET 2013
Fixes Ticket3103
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
---
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 6a10d71..ce91219 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;
--
1.7.9.5
More information about the ffmpeg-devel
mailing list