mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-13 18:17:39 -04:00
cuesheet.c guard against invalid digits causing underflow on field ASAN
is digit checks for invalid fields but could possibly check field = -1 Change-Id: I5f6bc5047b1ec0bf122d360f8eb86e64a2784bef
This commit is contained in:
parent
19aa4ca276
commit
b40dff510a
1 changed files with 1 additions and 1 deletions
|
@ -139,7 +139,7 @@ static unsigned long parse_cue_index(const char *line)
|
|||
while (isdigit(*line))
|
||||
{
|
||||
value = 10 * value + (*line - '0');
|
||||
if (value > field_max[field]) /* Sanity check bail early */
|
||||
if (field >= 0 && value > field_max[field]) /* Sanity check bail early */
|
||||
return 0;
|
||||
line++;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue