From c8d8d339d311bfabb16b557141de38aec1b6e5a8 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sat, 26 Feb 2005 07:37:49 +0000 Subject: (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. --- lib/vasnprintf.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- cgit v1.2.3-54-g00ecf