History

avformat/rmdec: check tag_size

Fixes: signed integer overflow: -2147483648 - 8 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-6598073725353984

Michael Niedermayer committed 4 years ago

Commit 2cb7ee81 parent 2c146401 file · +2 −0Browse files

Showing the changes to libavformat (1 of 1 file). Show all

Unified · Split

libavformat/rmdec.c+2−0
@@ -563,6 +563,8 @@ static int rm_read_header(AVFormatContext *s) · 562 unmodified lines
563 }563 }
564 564
565 tag_size = avio_rb32(pb);565 tag_size = avio_rb32(pb);
566 if (tag_size < 0)
567 return AVERROR_INVALIDDATA;
566 avio_skip(pb, tag_size - 8);568 avio_skip(pb, tag_size - 8);
567 569
568 for(;;) {570 for(;;) {

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