Fix cuesheet parsing code skipping a digit

The code parsing cuepoints of the form MM:SS.SS, which is only
allowed for non-CDDA, had a bug where the first S of the above
template was skipped. That meant that 00:12.34 was parsed as
00:02.34. This is not covered in the test suite, but fuzzing
stumbled on it as 00: as input made the parser skip the string-
terminating nul.

Credit: Oss-Fuzz
Issue: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=57320
This commit is contained in:
Martijn van Beurden 2023-05-04 14:58:48 +02:00
parent 321c4aeb22
commit af6df3b953
1 changed files with 0 additions and 1 deletions

View File

@ -188,7 +188,6 @@ static FLAC__int64 local__parse_ms_(const char *s, uint32_t sample_rate)
ret = field * 60 * sample_rate;
s++; /* skip the ':' */
if(strspn(s, "0123456789.") != strlen(s))
return -1;
x = strtod(s, &end);