Commit b1683084 authored by Michael Niedermayer's avatar Michael Niedermayer

tiff: in add_string_metadata() check the count more completely

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 5de286ef
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment