Fixes overflow check for bit_rate multiplication few lines below. Found by OSS-Fuzz.
Unified · Split
| @@ -202,6 +202,8 @@ static int rpl_read_header(AVFormatContext *s) · 201 unmodified lines | ||
| 202 | 202 | ast->codecpar->codec_type = AVMEDIA_TYPE_AUDIO; |
| 203 | 203 | ast->codecpar->codec_tag = audio_format; |
| 204 | 204 | ast->codecpar->sample_rate = read_line_and_int(pb, &error); // audio bitrate |
| 205 | + if (ast->codecpar->sample_rate < 0) | |
| 206 | + return AVERROR_INVALIDDATA; | |
| 205 | 207 | channels = read_line_and_int(pb, &error); // number of audio channels |
| 206 | 208 | error |= read_line(pb, line, sizeof(line)); |
| 207 | 209 | ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample |