[FFmpeg-cvslog] avcodec/tiff_common: allow count = 0 in ff_tadd_bytes_metadata()

Michael Niedermayer git at videolan.org
Mon Nov 18 15:19:45 CET 2013


ffmpeg | branch: release/2.1 | Michael Niedermayer <michaelni at gmx.at> | Thu Oct 31 23:29:01 2013 +0100| [3193b85be33347f5cd48f0978092c9b53181defa] | committer: Carl Eugen Hoyos

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>
(cherry picked from commit 73d887733dc2ccb5d570615a753d5c44c3f1d9a4)

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3193b85be33347f5cd48f0978092c9b53181defa
---

 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