Browse Source

tiff: in add_string_metadata() check the count more completely

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n1.2
Michael Niedermayer 13 years ago
parent
commit
b16830840e
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavcodec/tiff.c

+ 1
- 1
libavcodec/tiff.c View File

@@ -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);


Loading…
Cancel
Save