diff options
author | Ulrich Drepper <drepper@redhat.com> | 1998-04-15 10:15:16 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1998-04-15 10:15:16 +0000 |
commit | 479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc (patch) | |
tree | 9c17c6ca936f6c5ec2c003c9e47292bdba689643 /elf | |
parent | 480bc72713c841bbf55f4a33fe9f11d2c304ef1a (diff) | |
download | glibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.tar glibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.tar.gz glibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.tar.bz2 glibc-479e9b3f2135707d4bfd13bf6c2ad1a242ea6cfc.zip |
Update.
1998-04-15 Ulrich Drepper <drepper@cygnus.com>
* iconv/gconv_simple.c (__gconv_transform_ucs4_ascii): Fix typo in
last change.
1998-04-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* elf/dl-minimal.c (__strtol_internal): Correct range check. Fix
return value on overflow.
1998-04-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* sysdeps/posix/mkstemp.c (mkstemp): Change value and v to 64
bits.
1998-04-14 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
* malloc/mtrace.c (mtrace): Use standard function setvbuf instead
of non-standard function setbuffer.
1998-04-15 Andreas Jaeger <aj@arthur.rhein-neckar.de>
* stdio-common/perror.c: Include <string.h> for __strerror_r.
Diffstat (limited to 'elf')
-rw-r--r-- | elf/dl-minimal.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/elf/dl-minimal.c b/elf/dl-minimal.c index c9a0575fd0..b0c8c465e4 100644 --- a/elf/dl-minimal.c +++ b/elf/dl-minimal.c @@ -247,15 +247,12 @@ __strtol_internal (const char *nptr, char **endptr, int base, int group) { unsigned long int digval = *nptr - '0'; if (result > LONG_MAX / 10 - || (result == (sign - ? (unsigned long int) LONG_MAX - : (unsigned long int) LONG_MAX + 1) / 10 - && digval > (sign - ? (unsigned long int) LONG_MAX - : (unsigned long int) LONG_MAX + 1) % 10)) + || (sign > 0 ? result == LONG_MAX / 10 && digval > LONG_MAX % 10 + : (result == ((unsigned long int) LONG_MAX + 1) / 10 + && digval > ((unsigned long int) LONG_MAX + 1) % 10))) { errno = ERANGE; - return LONG_MAX * sign; + return sign > 0 ? LONG_MAX : LONG_MIN; } result *= 10; result += digval; |