X-Git-Url: http://git.silcnet.org/gitweb/?p=silc.git;a=blobdiff_plain;f=lib%2Fsilchttp%2Fsilchttpserver.c;h=e83d2f379b274f1106774bbc754ecb98ecf8482d;hp=772d9c9b2b5e742a4d88bf8e3c54eb7c76a7a517;hb=b2b91b074b6701455053425b583a6fd0beedc8cc;hpb=beb16a86f0d6f856a3be0761f213970fe959d3cf diff --git a/lib/silchttp/silchttpserver.c b/lib/silchttp/silchttpserver.c index 772d9c9b..e83d2f37 100644 --- a/lib/silchttp/silchttpserver.c +++ b/lib/silchttp/silchttpserver.c @@ -146,7 +146,7 @@ static SilcBool silc_http_server_parse(SilcHttpServer httpd, SILC_LOG_DEBUG(("URI: '%s'", conn->uri)); /* Protocol version compatibility */ - tmp = memchr(tmp, '\0', data_len - (tmp - data)) + 1; + tmp = ((unsigned char *)memchr(tmp, '\0', data_len - (tmp - data))) + 1; SILC_LOG_DEBUG(("Protocol: %s", tmp)); if (strstr(tmp, "HTTP/1.0")) conn->keepalive = FALSE; @@ -194,7 +194,7 @@ static SilcBool silc_http_server_parse(SilcHttpServer httpd, /* Check we have received all data */ cl = silc_mime_get_field(conn->curheaders, "Content-Length"); - if (cl && sscanf(cl, "%lu", (unsigned long *)&cll) == 1) { + if (cl && sscanf(cl, "%u", &cll) == 1) { if (data_len < cll) { /* More data to come */ silc_mime_free(conn->curheaders);