[FFmpeg-cvslog] tiff: in add_string_metadata() check the count more completely
Michael Niedermayer
git at videolan.org
Sun Jan 27 06:16:30 CET 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Jan 27 04:53:03 2013 +0100| [b16830840eb9bdec88fce2aebb38a582e093ab6b] | committer: Michael Niedermayer
tiff: in add_string_metadata() check the count more completely
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b16830840eb9bdec88fce2aebb38a582e093ab6b
---
libavcodec/tiff.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index d5fba7e..fdcd937 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -308,7 +308,7 @@ static int add_string_metadata(int count, const char *name,
{
char *value;
- if (bytestream2_get_bytes_left(&s->gb) < count)
+ if (bytestream2_get_bytes_left(&s->gb) < count || count < 0)
return AVERROR_INVALIDDATA;
value = av_malloc(count + 1);
More information about the ffmpeg-cvslog
mailing list