From 65930003e56b64afdde64cd9597e55b21d08b7c3 Mon Sep 17 00:00:00 2001 From: Wolfgang Draxinger Date: Wed, 2 Oct 2013 17:26:11 +0200 Subject: signed-unsigned comparisions fixed --- picohttp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/picohttp.c b/picohttp.c index 51f66ec..d813a3e 100644 --- a/picohttp.c +++ b/picohttp.c @@ -839,8 +839,8 @@ static void picohttpProcessHeaderAuthorization( char *c; for(c = user_password; *c && ':' != *c; c++); if( !*c - || (c - user_password >= user_password_max_len) - || (c - user_password > req->query.auth->username_maxlen) + || ((size_t)(c - user_password) >= user_password_max_len) + || ((size_t)(c - user_password) > req->query.auth->username_maxlen) || (strlen(c+1) > req->query.auth->pwresponse_maxlen) ) { /* no colon found, or colon is last character in string * or username part doesn't fit into auth.username field -- cgit v1.2.3