Fixes: 42537199/clusterfuzz-testcase-minimized-fuzzer_loadfile_direct-5447162658357248 Fixes: runtime error: signed integer overflow: -3330498059201358222 * 4 cannot be represented in type 'int64_t' (aka 'long')
Unified · Split
| @@ -205,6 +205,8 @@ static int rpl_read_header(AVFormatContext *s) · 204 unmodified lines | |||
| 205 | if (ast->codecpar->sample_rate < 0) | 205 | if (ast->codecpar->sample_rate < 0) |
| 206 | return AVERROR_INVALIDDATA; | 206 | return AVERROR_INVALIDDATA; |
| 207 | channels = read_line_and_int(pb, &error); // number of audio channels | 207 | channels = read_line_and_int(pb, &error); // number of audio channels |
| 208 | if (channels <= 0) | ||
| 209 | return AVERROR_INVALIDDATA; | ||
| 208 | error |= read_line(pb, line, sizeof(line)); | 210 | error |= read_line(pb, line, sizeof(line)); |
| 209 | ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample | 211 | ast->codecpar->bits_per_coded_sample = read_int(line, &endptr, &error); // audio bits per sample |
| 210 | av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH); | 212 | av_strlcpy(audio_type, endptr, RPL_LINE_LENGTH); |