History

avformat/mvdec: Check if name was fully read

Fixes: use of uninitialized value Fixes: 70901/clusterfuzz-testcase-minimized-ffmpeg_dem_MV_fuzzer-6341913949569024

Michael Niedermayer committed 2 years ago

Commit 4e397951 parent 53387071 file · +2 −1Browse files

Unified · Split

libavformat/mvdec.c+2−1
@@ -256,7 +256,8 @@ static int read_table(AVFormatContext *avctx, AVStream *st, · 255 unmodified lines
256256 if (avio_feof(pb))
257257 return AVERROR_EOF;
258258
259− avio_read(pb, name, 16);
259+ if (avio_read(pb, name, 16) != 16)
260+ return AVERROR_INVALIDDATA;
260261 name[sizeof(name) - 1] = 0;
261262 size = avio_rb32(pb);
262263 if (size < 0) {

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