History

avformat/moflex: Check m->size before seeking

Fixes: Infinite loop Fixes: 26016/clusterfuzz-testcase-minimized-ffmpeg_IO_DEMUXER_fuzzer-6195663833137152

Michael Niedermayer committed 6 years ago

Commit acd735e1 parent 3291d991 file · +4 −1Browse files

Unified · Split

libavformat/moflex.c+4−1
@@ -342,8 +342,11 @@ static int moflex_read_packet(AVFormatContext *s, AVPacket *pkt) · 341 unmodified lines
342342
343343 m->in_block = 0;
344344
345− if (m->flags % 2 == 0)
345+ if (m->flags % 2 == 0) {
346+ if (m->size <= 0)
347+ return AVERROR_INVALIDDATA;
346348 avio_seek(pb, m->pos + m->size, SEEK_SET);
349+ }
347350 }
348351
349352 return AVERROR_EOF;

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