Fixes: signed integer overflow: -2147483648 - 8 cannot be represented in type 'int' Fixes: 50993/clusterfuzz-testcase-minimized-ffmpeg_dem_RM_fuzzer-6598073725353984
Showing the changes to libavformat (1 of 1 file). Show all
Unified · Split
| @@ -563,6 +563,8 @@ static int rm_read_header(AVFormatContext *s) · 562 unmodified lines | ||
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | tag_size = avio_rb32(pb); |
| 566 | + if (tag_size < 0) | |
| 567 | + return AVERROR_INVALIDDATA; | |
| 566 | 568 | avio_skip(pb, tag_size - 8); |
| 567 | 569 | |
| 568 | 570 | for(;;) { |