mirror of
https://github.com/curl/curl.git
synced 2026-06-02 00:04:15 +03:00
http: fix off-by-one error in request method length check
It should allow one more byte. Closes #12534
This commit is contained in:
parent
102de7aa8d
commit
1e9db6997a
1 changed files with 2 additions and 2 deletions
|
|
@ -4609,7 +4609,7 @@ CURLcode Curl_http_req_make(struct httpreq **preq,
|
|||
CURLcode result = CURLE_OUT_OF_MEMORY;
|
||||
|
||||
DEBUGASSERT(method);
|
||||
if(m_len + 1 >= sizeof(req->method))
|
||||
if(m_len + 1 > sizeof(req->method))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
req = calloc(1, sizeof(*req));
|
||||
|
|
@ -4765,7 +4765,7 @@ CURLcode Curl_http_req_make2(struct httpreq **preq,
|
|||
CURLUcode uc;
|
||||
|
||||
DEBUGASSERT(method);
|
||||
if(m_len + 1 >= sizeof(req->method))
|
||||
if(m_len + 1 > sizeof(req->method))
|
||||
return CURLE_BAD_FUNCTION_ARGUMENT;
|
||||
|
||||
req = calloc(1, sizeof(*req));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue