Skip to content

http2: check push header correctly - #18930

Closed
icing wants to merge 1 commit into
curl:masterfrom
icing:h2-push-header-check
Closed

http2: check push header correctly#18930
icing wants to merge 1 commit into
curl:masterfrom
icing:h2-push-header-check

Conversation

@icing

@icing icing commented Oct 8, 2025

Copy link
Copy Markdown
Contributor

header names delivered by nghttp2 are not 0-terminated. Fix code to accomodate for that.

reported-by: Joshua Rogers

header names delivered by nghttp2 are not 0-terminated. Fix
code to accomodate for that.

reported-by: Joshua Rogers
@icing icing added the HTTP/2 label Oct 8, 2025
@github-actions github-actions Bot added the HTTP label Oct 8, 2025
@bagder

bagder commented Oct 8, 2025

Copy link
Copy Markdown
Member

I think they are nul terminated as per the API docs.

@bagder

bagder commented Oct 8, 2025

Copy link
Copy Markdown
Member

Both name and value are guaranteed to be NULL-terminated

From: https://nghttp2.org/documentation/types.html#c.nghttp2_on_header_callback

@bagder

bagder commented Oct 8, 2025

Copy link
Copy Markdown
Member

hm, different callback?

@icing

icing commented Oct 8, 2025

Copy link
Copy Markdown
Contributor Author

Anyway, I think checking the length first is better.

@bagder bagder closed this in 93e91e9 Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants