mirror of
https://github.com/curl/curl.git
synced 2026-08-24 20:03:52 +03:00
http: add asserts for null terminator for input strings
http_rw_hd() assumes the null terminator is present. These asserts make sure this remains true. Closes #19741
This commit is contained in:
parent
48939a4575
commit
bfc3d131b6
2 changed files with 3 additions and 0 deletions
|
|
@ -820,6 +820,7 @@ CURLcode Curl_xfer_write_resp_hd(struct Curl_easy *data,
|
|||
const char *hd0, size_t hdlen, bool is_eos)
|
||||
{
|
||||
if(data->conn->handler->write_resp_hd) {
|
||||
DEBUGASSERT(!hd0[hdlen]); /* null terminated */
|
||||
/* protocol handlers offering this function take full responsibility
|
||||
* for writing all received download data to the client. */
|
||||
return data->conn->handler->write_resp_hd(data, hd0, hdlen, is_eos);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue