From 44d84ac1646cf04ccc2c1a736f3c9d1644ccacec Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 17 Oct 2006 21:32:56 +0000 Subject: Avoid typecasting a signed char to an int when using is*() functions, as that could very well cause a negate number get passed in and thus cause reading outside of the array usually used for this purpose. We avoid this by using the uppercase macro versions introduced just now that does some extra crazy typecasts to avoid byte codes > 127 to cause negative int values. --- lib/strtoofft.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/strtoofft.c') diff --git a/lib/strtoofft.c b/lib/strtoofft.c index b11755b1b..3ab1bfdff 100644 --- a/lib/strtoofft.c +++ b/lib/strtoofft.c @@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2005, Daniel Stenberg, , et al. + * Copyright (C) 1998 - 2006, Daniel Stenberg, , et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -55,7 +55,7 @@ curlx_strtoll(const char *nptr, char **endptr, int base) /* Skip leading whitespace. */ end = (char *)nptr; - while (isspace((int)end[0])) { + while (ISSPACE(end[0])) { end++; } -- cgit v1.2.3