History

avformat/mxfdec: Check that key was read sucessfull

Fixes: use of uninitialized value Fixes: 70932/clusterfuzz-testcase-minimized-ffmpeg_dem_MXF_fuzzer-4870202133643264

Michael Niedermayer committed 2 years ago

Commit 4c62cbc1 parent d3aa99a1 file · +2 −1Browse files

Unified · Split

libavformat/mxfdec.c+2−1
@@ -1556,7 +1556,8 @@ static int mxf_read_indirect_value(void *arg, AVIOContext *pb, int size) · 1555 unmodified lines
15561556 if (size <= 17)
15571557 return 0;
15581558
1559− avio_read(pb, key, 17);
1559+ if (avio_read(pb, key, 17) != 17)
1560+ return AVERROR_INVALIDDATA;
15601561 /* TODO: handle other types of of indirect values */
15611562 if (memcmp(key, mxf_indirect_value_utf16le, 17) == 0) {
15621563 return mxf_read_utf16le_string(pb, size - 17, &tagged_value->value);

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