mirror of
https://github.com/curl/curl.git
synced 2026-07-28 18:33:06 +03:00
spacecheck: double spaces in folded strings, fix fallouts
Closes #20695
This commit is contained in:
parent
65262be0ab
commit
453470fab1
5 changed files with 15 additions and 5 deletions
|
|
@ -1702,7 +1702,7 @@ static CURLcode http2_handle_stream_close(struct Curl_cfilter *cf,
|
|||
}
|
||||
else if(!stream->bodystarted) {
|
||||
failf(data, "HTTP/2 stream %d was closed cleanly, but before getting "
|
||||
" all response header fields, treated as error", stream->id);
|
||||
"all response header fields, treated as error", stream->id);
|
||||
return CURLE_HTTP2_STREAM;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -902,8 +902,8 @@ static CURLcode rtsp_rtp_write_resp(struct Curl_easy *data,
|
|||
/* we SHOULD have consumed all bytes, unless the response is borked.
|
||||
* In which case we write out the left over bytes, letting the client
|
||||
* writer deal with it (it will report EXCESS and fail the transfer). */
|
||||
DEBUGF(infof(data, "rtsp_rtp_write_resp(len=%zu, in_header=%d, done=%d "
|
||||
" rtspc->state=%d, req.size=%" FMT_OFF_T ")",
|
||||
DEBUGF(infof(data, "rtsp_rtp_write_resp(len=%zu, in_header=%d, done=%d, "
|
||||
"rtspc->state=%d, req.size=%" FMT_OFF_T ")",
|
||||
blen, rtspc->in_header, data->req.done, rtspc->state,
|
||||
data->req.size));
|
||||
if(!result && (is_eos || blen)) {
|
||||
|
|
|
|||
|
|
@ -451,7 +451,7 @@ static CURLcode tftp_tx(struct tftp_conn *state, tftp_event_t event)
|
|||
/* Increment the retry counter and log the timeout */
|
||||
state->retries++;
|
||||
infof(data, "Timeout waiting for block %d ACK. "
|
||||
" Retries = %d", NEXT_BLOCKNUM(state->block), state->retries);
|
||||
"Retries = %d", NEXT_BLOCKNUM(state->block), state->retries);
|
||||
/* Decide if we have had enough */
|
||||
if(state->retries > state->retry_max) {
|
||||
state->error = TFTP_ERR_TIMEOUT;
|
||||
|
|
|
|||
|
|
@ -407,7 +407,7 @@ static CURLcode get_client_cert(struct Curl_easy *data,
|
|||
if((fInCert || blob) && data->set.ssl.cert_type &&
|
||||
!curl_strequal(data->set.ssl.cert_type, "P12")) {
|
||||
failf(data, "schannel: certificate format compatibility error "
|
||||
" for %s",
|
||||
"for %s",
|
||||
blob ? "(memory blob)" : data->set.ssl.primary.clientcert);
|
||||
curlx_free(cert_store_path);
|
||||
if(fInCert)
|
||||
|
|
|
|||
|
|
@ -170,6 +170,16 @@ while(my $filename = <$git_ls_files>) {
|
|||
}
|
||||
}
|
||||
|
||||
my $search = $content;
|
||||
my $linepos = 0;
|
||||
while($search =~ / "\n *" /) {
|
||||
my $part = substr($search, 0, $+[0]);
|
||||
$search = substr($search, $+[0]);
|
||||
my $line = ($part =~ tr/\n//);
|
||||
push @err, sprintf("line %d: double spaces in folded string", $linepos + $line);
|
||||
$linepos += $line;
|
||||
}
|
||||
|
||||
if($content =~ /([\x00-\x08\x0b\x0c\x0e-\x1f\x7f])/) {
|
||||
push @err, "content: has binary contents";
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue