Restrict parse value to strtoll with restrictions on input.

This commit is contained in:
rakshasa
2026-09-30 12:26:37 +02:00
committed by Jari Sundell
parent 3c94b03323
commit 3af0410a6e
+3
View File
@@ -134,6 +134,9 @@ parse_value_nothrow(const char* src, int64_t* value, int base, int unit) {
return first;
}
if (base == 10 && src[0] == '0' && (src[1] >= '0' && src[1] <= '9'))
return first;
char* last{};
errno = 0;