Fixed stack use-after-return bug in strntoll

This commit is contained in:
Ahmad Hazimeh
2020-08-31 18:39:50 +02:00
parent 17e1a72b3b
commit 9bbbec3fa8

View File

@ -282,7 +282,6 @@ static long long strntoll(const char *str, size_t sz, char **end, int base) {
memcpy(buf, beg, sz);
buf[sz] = '\0';
ret = strtoll(buf, end, base);
if (ret == LLONG_MIN || ret == LLONG_MAX) return ret;
if (end) *end = (char *)beg + (*end - buf);
return ret;