summaryrefslogtreecommitdiff
path: root/lib/libfetch/http.c
diff options
context:
space:
mode:
authorDag-Erling Smørgrav <des@FreeBSD.org>2008-02-06 11:39:55 +0000
committerDag-Erling Smørgrav <des@FreeBSD.org>2008-02-06 11:39:55 +0000
commit79257dd70a02290126060aa7876802653cb5badc (patch)
tree651f9d9cdeb5ef70de4780778701e054d74f3d5b /lib/libfetch/http.c
parent2c41053e78a309129ca9734cff72d3fd0b8b28c2 (diff)
Notes
Diffstat (limited to 'lib/libfetch/http.c')
-rw-r--r--lib/libfetch/http.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/libfetch/http.c b/lib/libfetch/http.c
index 2ee76e289ad6..a5499c61c256 100644
--- a/lib/libfetch/http.c
+++ b/lib/libfetch/http.c
@@ -150,7 +150,7 @@ http_new_chunk(struct httpio *io)
*p - '0';
} else {
io->chunksize = io->chunksize * 16 +
- 10 + tolower(*p) - 'a';
+ 10 + tolower((unsigned char)*p) - 'a';
}
}
@@ -434,7 +434,8 @@ http_get_reply(conn_t *conn)
static const char *
http_match(const char *str, const char *hdr)
{
- while (*str && *hdr && tolower(*str++) == tolower(*hdr++))
+ while (*str && *hdr &&
+ tolower((unsigned char)*str++) == tolower((unsigned char)*hdr++))
/* nothing */;
if (*str || *hdr != ':')
return (NULL);