summaryrefslogtreecommitdiff
path: root/libavcodec/tiff.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-01-27 04:53:03 +0100
committerMichael Niedermayer <michaelni@gmx.at>2013-01-27 04:53:03 +0100
commitb16830840eb9bdec88fce2aebb38a582e093ab6b (patch)
tree766f9505af4b27697bbc3b8fa2ebb4da7e8d7622 /libavcodec/tiff.c
parent5de286ef88befc23959d345c12d27a76095b8b0e (diff)
tiff: in add_string_metadata() check the count more completely
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/tiff.c')
-rw-r--r--libavcodec/tiff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index d5fba7ea6f..fdcd9374a1 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);