Skip to content
Snippets Groups Projects
Commit b1683084 authored by Michael Niedermayer's avatar Michael Niedermayer
Browse files

tiff: in add_string_metadata() check the count more completely

parent 5de286ef
No related branches found
No related tags found
No related merge requests found
...@@ -308,7 +308,7 @@ static int add_string_metadata(int count, const char *name, ...@@ -308,7 +308,7 @@ static int add_string_metadata(int count, const char *name,
{ {
char *value; char *value;
if (bytestream2_get_bytes_left(&s->gb) < count) if (bytestream2_get_bytes_left(&s->gb) < count || count < 0)
return AVERROR_INVALIDDATA; return AVERROR_INVALIDDATA;
value = av_malloc(count + 1); value = av_malloc(count + 1);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment