world tour
This commit is contained in:
parent
34380748b0
commit
3f63bdaff3
@ -89,7 +89,7 @@ intmax_t readMaxCount(char *buffer, int size) {
|
|||||||
char *endPtr;
|
char *endPtr;
|
||||||
intmax_t result = strtoimax(buffer, &endPtr, 10);
|
intmax_t result = strtoimax(buffer, &endPtr, 10);
|
||||||
|
|
||||||
if (errno == ERANGE || endPtr != buffer + (l - 1)) {
|
if (errno == ERANGE || result == 0 || endPtr != buffer + (l - 1)) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user