mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-04 21:29:21 +00:00
Restrict parse value to strtoll with restrictions on input.
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user