Fixes https://github.com/curl/curl/issues/6696 #6697
Closed
Conversation
lib/c-hyper.c
Outdated
@@ -464,7 +464,7 @@ CURLcode Curl_hyper_header(struct Curl_easy *data, hyper_headers *headers, | |||
else | |||
linelen = 2; /* CRLF ending */ | |||
linelen += (p - n); | |||
if(!n) | |||
if(!p) |
jay
Mar 5, 2021
Member
AFAICS neither n nor p can be null here so I don't know why that check is there. Do you want to adjust your PR to remove it?
AFAICS neither n nor p can be null here so I don't know why that check is there. Do you want to adjust your PR to remove it?
kokke
Mar 5, 2021
Author
Contributor
You mean remove the entire if-statement?
467 if(!p)
468 return CURLE_BAD_FUNCTION_ARGUMENT;
You mean remove the entire if-statement?
467 if(!p)
468 return CURLE_BAD_FUNCTION_ARGUMENT;
|
Thanks |
Thank you for super-swift action @jay |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Fixes #6696
From lib/c-hyper.c:445-467 - n is checked against NULL instead of p, at line 467
I have inserted comments at line 445 and 467.