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
308308 {
309309 char *value;
310310
311− if (bytestream2_get_bytes_left(&s->gb) < count)
311+ if (bytestream2_get_bytes_left(&s->gb) < count || count < 0)
312312 return AVERROR_INVALIDDATA;
313313
314314 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