diff --git a/src/config.c b/src/config.c index 7fe6b9c..a25cc43 100644 --- a/src/config.c +++ b/src/config.c @@ -573,7 +573,7 @@ configure_http_postbody_max(char **argv) return (KORE_RESULT_ERROR); } - http_postbody_max = kore_strtonum(argv[1], 10, 1, ULONG_MAX, &err); + http_postbody_max = kore_strtonum(argv[1], 10, 1, LONG_MAX, &err); if (err != KORE_RESULT_OK) { printf("bad http_postbody_max value: %s\n", argv[1]); return (KORE_RESULT_ERROR); @@ -595,7 +595,7 @@ configure_http_hsts_enable(char **argv) return (KORE_RESULT_ERROR); } - http_hsts_enable = kore_strtonum(argv[1], 10, 0, ULONG_MAX, &err); + http_hsts_enable = kore_strtonum(argv[1], 10, 0, LONG_MAX, &err); if (err != KORE_RESULT_OK) { printf("bad http_hsts_enable value: %s\n", argv[1]); return (KORE_RESULT_ERROR); diff --git a/src/http.c b/src/http.c index be2e325..5d466b1 100644 --- a/src/http.c +++ b/src/http.c @@ -472,7 +472,7 @@ http_header_recv(struct netbuf *nb) return (KORE_RESULT_ERROR); } - clen = kore_strtonum(p, 10, 0, ULONG_MAX, &v); + clen = kore_strtonum(p, 10, 0, LONG_MAX, &v); if (v == KORE_RESULT_ERROR) { kore_mem_free(p); kore_debug("content-length invalid: %s", p);