[FFmpeg-cvslog] avcodec/tiff_common: allow count = 0 in ff_tadd_bytes_metadata()
Michael Niedermayer
git at videolan.org
Fri Nov 1 19:54:45 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 31 23:29:01 2013 +0100| [73d887733dc2ccb5d570615a753d5c44c3f1d9a4] | committer: Michael Niedermayer
avcodec/tiff_common: allow count = 0 in ff_tadd_bytes_metadata()
Fixes Ticket3103
Reviewed-by: Thilo Borgmann <thilo.borgmann at mail.de>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=73d887733dc2ccb5d570615a753d5c44c3f1d9a4
---
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;
More information about the ffmpeg-cvslog
mailing list