diff options
Diffstat (limited to 'elf/dl-minimal.c')
-rw-r--r-- | elf/dl-minimal.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c index 5184c11..8922edc 100644 --- a/elf/dl-minimal.c +++ b/elf/dl-minimal.c @@ -252,6 +252,8 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group) || (result == ULONG_MAX / 10 && digval > ULONG_MAX % 10)) { errno = ERANGE; + if (endptr != NULL) + *endptr = (char *) nptr; return ULONG_MAX; } result *= base; @@ -259,5 +261,7 @@ __strtoul_internal (const char *nptr, char **endptr, int base, int group) ++nptr; } + if (endptr != NULL) + *endptr = (char *) nptr; return result * sign; } |