aboutsummaryrefslogtreecommitdiff
path: root/src/microhttpd/digestauth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/microhttpd/digestauth.c')
-rw-r--r--src/microhttpd/digestauth.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/microhttpd/digestauth.c b/src/microhttpd/digestauth.c
index 8b9abd18..b40e1fc2 100644
--- a/src/microhttpd/digestauth.c
+++ b/src/microhttpd/digestauth.c
@@ -480,7 +480,7 @@ lookup_sub_value (char *dest,
480 else 480 else
481 { 481 {
482 if (size > (size_t) ((q2 - q1) + 1)) 482 if (size > (size_t) ((q2 - q1) + 1))
483 size = (q2 - q1) + 1; 483 size = (size_t) (q2 - q1) + 1;
484 size--; 484 size--;
485 memcpy (dest, 485 memcpy (dest,
486 q1, 486 q1,
@@ -541,7 +541,7 @@ check_nonce_nc (struct MHD_Connection *connection,
541 np = nonce; 541 np = nonce;
542 while ('\0' != *np) 542 while ('\0' != *np)
543 { 543 {
544 off = (off << 8) | (*np ^ (off >> 24)); 544 off = (off << 8) | (((uint8_t) *np) ^ (off >> 24));
545 np++; 545 np++;
546 } 546 }
547 off = off % mod; 547 off = off % mod;
@@ -1399,7 +1399,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
1399 char *header; 1399 char *header;
1400 1400
1401 header = MHD_calloc_ (1, 1401 header = MHD_calloc_ (1,
1402 hlen + 1); 1402 (size_t) hlen + 1);
1403 if (NULL == header) 1403 if (NULL == header)
1404 { 1404 {
1405#ifdef HAVE_MESSAGES 1405#ifdef HAVE_MESSAGES
@@ -1410,7 +1410,7 @@ MHD_queue_auth_fail_response2 (struct MHD_Connection *connection,
1410 } 1410 }
1411 1411
1412 if (MHD_snprintf_ (header, 1412 if (MHD_snprintf_ (header,
1413 hlen + 1, 1413 (size_t) hlen + 1,
1414 "Digest realm=\"%s\",qop=\"auth\",nonce=\"%s\",opaque=\"%s\",algorithm=%s%s", 1414 "Digest realm=\"%s\",qop=\"auth\",nonce=\"%s\",opaque=\"%s\",algorithm=%s%s",
1415 realm, 1415 realm,
1416 nonce, 1416 nonce,