diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-26 07:37:49 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2005-02-26 07:37:49 +0000 |
commit | c8d8d339d311bfabb16b557141de38aec1b6e5a8 (patch) | |
tree | ec8f4082679a114ecb90282f2971bcdf49cd7fc0 /lib | |
parent | f93ba587561d0fc84d779e86039427828956c77c (diff) | |
download | coreutils-c8d8d339d311bfabb16b557141de38aec1b6e5a8.tar.xz |
(VASNPRINTF) [!USE_SNPRINTF]: Correct the test for
integer overflow again. Actually, neither this nor the 2005-01-23
change fixes any bug on any plausible platform; it's more of a
code-clarity thing.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vasnprintf.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c index c4c166467..a21134016 100644 --- a/lib/vasnprintf.c +++ b/lib/vasnprintf.c @@ -295,7 +295,7 @@ VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list ar do { size_t w_tmp = width * 10 + (*digitp++ - '0'); - if (SIZE_MAX / 10 <= width || w_tmp < width) + if (SIZE_MAX / 10 < width || w_tmp < width) goto out_of_memory; width = w_tmp; } |