diff options
author | William Wilgus <wilgus.william@gmail.com> | 2022-11-21 23:17:56 -0500 |
---|---|---|
committer | William Wilgus <wilgus.william@gmail.com> | 2022-11-21 23:24:30 -0500 |
commit | b40dff510a59fa2a529f0fd3133e517c8807d673 (patch) | |
tree | 174e322afd15906738f5733e45226e2410ec45e7 | |
parent | 19aa4ca276dc39422cb645ed46fe738c7e08934e (diff) | |
download | rockbox-b40dff510a.tar.gz rockbox-b40dff510a.zip |
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
-rw-r--r-- | apps/cuesheet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/cuesheet.c b/apps/cuesheet.c index 561be6a677..263fed154d 100644 --- a/apps/cuesheet.c +++ b/apps/cuesheet.c @@ -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++; } |