From: Ivan Date: Mon, 6 May 2024 08:35:53 +0000 (+0200) Subject: misc: fix typos, quoting and spelling X-Git-Tag: curl-8_8_0~122 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a74f4d95182204567e6b66322087c18f4643e1b7;p=thirdparty%2Fcurl.git misc: fix typos, quoting and spelling Fix wording of comments, and misquotings where `' is markdown parsed where it shouldn't be, and remove a misspelled preprocessor comment which really isn't needed (and removing it makes it match surrounding code better). Closes: #13538 Reviewed-by: Daniel Gustafsson --- diff --git a/docs/libcurl/curl_getdate.md b/docs/libcurl/curl_getdate.md index 2992dac0f3..8df080ce9f 100644 --- a/docs/libcurl/curl_getdate.md +++ b/docs/libcurl/curl_getdate.md @@ -65,7 +65,7 @@ UTC. Supported formats include: -1200, MST, +0100. ## day of the week items Specifies a day of the week. Days of the week may be spelled out in full -(using English): `Sunday', `Monday', etc or they may be abbreviated to their +(using English): 'Sunday', 'Monday', etc or they may be abbreviated to their first three letters. This is usually not info that adds anything. ## pure numbers diff --git a/docs/libcurl/curl_multi_wait.md b/docs/libcurl/curl_multi_wait.md index de8e0ff1f5..7440d7b3d9 100644 --- a/docs/libcurl/curl_multi_wait.md +++ b/docs/libcurl/curl_multi_wait.md @@ -34,7 +34,7 @@ curl_multi_wait(3) polls all file descriptors used by the curl easy handles contained in the given multi handle set. It blocks until activity is detected on at least one of the handles or *timeout_ms* has passed. Alternatively, if the multi handle has a pending internal timeout that has a -shorter expiry time than *timeout_ms*, that shorter time is be used +shorter expiry time than *timeout_ms*, that shorter time is being used instead to make sure timeout accuracy is reasonably kept. The calling application may pass additional *curl_waitfd* structures which diff --git a/docs/libcurl/libcurl-security.md b/docs/libcurl/libcurl-security.md index 93a1161363..541489d233 100644 --- a/docs/libcurl/libcurl-security.md +++ b/docs/libcurl/libcurl-security.md @@ -380,10 +380,11 @@ CURLOPT_TIMEOUT(3) and/or CURLOPT_LOW_SPEED_LIMIT(3) options can be used to mitigate against this. A malicious server could cause libcurl to download an infinite amount of data, -potentially causing all of memory or disk to be filled. Setting the -CURLOPT_MAXFILESIZE_LARGE(3) option is not sufficient to guard against -this. Instead, applications should monitor the amount of data received within -the write or progress callback and abort once the limit is reached. +potentially causing system resources to be exhausted resulting in a system or +application crash. Setting the CURLOPT_MAXFILESIZE_LARGE(3) option is not +sufficient to guard against this. Instead, applications should monitor the +amount of data received within the write or progress callback and abort once +the limit is reached. A malicious HTTP server could cause an infinite redirection loop, causing a denial-of-service. This can be mitigated by using the diff --git a/lib/headers.c b/lib/headers.c index ef947492de..9a5692e54e 100644 --- a/lib/headers.c +++ b/lib/headers.c @@ -253,7 +253,7 @@ static CURLcode unfold_value(struct Curl_easy *data, const char *value, newhs = Curl_saferealloc(hs, sizeof(*hs) + vlen + oalloc + 1); if(!newhs) return CURLE_OUT_OF_MEMORY; - /* ->name' and ->value point into ->buffer (to keep the header allocation + /* ->name and ->value point into ->buffer (to keep the header allocation in a single memory block), which now potentially have moved. Adjust them. */ newhs->name = newhs->buffer; diff --git a/lib/setopt.c b/lib/setopt.c index f719cc43dd..e4c8ebb95d 100644 --- a/lib/setopt.c +++ b/lib/setopt.c @@ -2324,7 +2324,7 @@ CURLcode Curl_vsetopt(struct Curl_easy *data, CURLoption option, va_list param) Curl_hsts_cleanup(&data->hsts); data->hsts = data->share->hsts; } -#endif /* CURL_DISABLE_HTTP */ +#endif #ifdef USE_SSL if(data->share->sslsession) { data->set.general_ssl.max_ssl_sessions = data->share->max_ssl_sessions;