History

tiff: in add_string_metadata() check the count more completely

Michael Niedermayer committed 13 years ago

Commit b1683081 parent 5de286e1 file · +1 −1Browse files

Unified · Split

libavcodec/tiff.c+1−1
@@ -308,7 +308,7 @@ static int add_string_metadata(int count, const char *name, · 307 unmodified lines
308{308{
309 char *value;309 char *value;
310 310
311 if (bytestream2_get_bytes_left(&s->gb) < count)311 if (bytestream2_get_bytes_left(&s->gb) < count || count < 0)
312 return AVERROR_INVALIDDATA;312 return AVERROR_INVALIDDATA;
313 313
314 value = av_malloc(count + 1);314 value = av_malloc(count + 1);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t