mirror of
https://github.com/ddidderr/wuffs.git
synced 2026-11-24 00:52:18 +01:00
base: don't read past the end of the slice in parse_number_{u64,f64}
This commit is contained in:
1 parent
2a6876f8bb
commit
9d41525a2f
4 files changed
+61
-36
No files matched your search
@@ -215,6 +215,7 @@ wuffs_base__parse_number_u64(wuffs_base__slice_u8 s, uint32_t options) {
|
||||
if (p < q) {
|
||||
goto hexadecimal;
|
||||
}
|
||||
goto fail_bad_argument;
|
||||
|
||||
} else if ((*p == 'd') || (*p == 'D')) {
|
||||
p++;
|
||||
@@ -225,6 +226,7 @@ wuffs_base__parse_number_u64(wuffs_base__slice_u8 s, uint32_t options) {
|
||||
if (p < q) {
|
||||
goto decimal;
|
||||
}
|
||||
goto fail_bad_argument;
|
||||
}
|
||||
|
||||
if (options & WUFFS_BASE__PARSE_NUMBER_XXX__ALLOW_MULTIPLE_LEADING_ZEROES) {
|
||||
|
||||
Reference in new issue
Block a user