aboutsummaryrefslogtreecommitdiff
path: root/lib/mprintf.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-10-17 21:32:56 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-10-17 21:32:56 +0000
commit44d84ac1646cf04ccc2c1a736f3c9d1644ccacec (patch)
tree78c8960a291ba0a11548ab34e88a9a7b1bbcee3f /lib/mprintf.c
parent930f9bd5342e6d514f9ba5b1303762c100621965 (diff)
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.
Diffstat (limited to 'lib/mprintf.c')
-rw-r--r--lib/mprintf.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mprintf.c b/lib/mprintf.c
index 543a39f15..610395318 100644
--- a/lib/mprintf.c
+++ b/lib/mprintf.c
@@ -171,7 +171,7 @@ int curl_msprintf(char *buffer, const char *format, ...);
static long dprintf_DollarString(char *input, char **end)
{
int number=0;
- while(isdigit((int)*input)) {
+ while(ISDIGIT(*input)) {
number *= 10;
number += *input-'0';
input++;