Skip to content

quiche: use PRIu64 for outputting the stream id#20849

Closed
bagder wants to merge 1 commit intomasterfrom
bagder/quiche-format
Closed

quiche: use PRIu64 for outputting the stream id#20849
bagder wants to merge 1 commit intomasterfrom
bagder/quiche-format

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 7, 2026

The 'id' struct field in 'struct h3_stream_ctx' is a uint64_t type so should be output with PRIu64 - and it makes sense to be consistent.

Note that the field with the same name in the ngtcp2 version of this struct is a signed 64-bit variable.

Reported by Codex Security

The 'id' struct field in 'struct h3_stream_ctx' is a uint64_t type so
should be output with PRIu64 - and it makes sense to be consistent.

Note that the field with the same name in the ngtcp2 version of this
struct is a *signed* 64-bit variable.

Reported by Codex Security
@bagder bagder added the HTTP/3 h3 or quic related label Mar 7, 2026
@bagder bagder requested a review from Copilot March 7, 2026 22:21
@bagder bagder marked this pull request as ready for review March 7, 2026 22:21
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes format specifier mismatches in lib/vquic/curl_quiche.c where stream->id (a uint64_t field) was being printed using PRId64 (signed) instead of PRIu64 (unsigned). The PR description correctly notes that the ngtcp2 version of this struct uses a signed int64_t for the same field name, making it important to use the appropriate specifier in each backend.

Changes:

  • Changed four instances of PRId64 to PRIu64 when formatting the stream->id field in trace and error messages, matching the actual uint64_t type of the field.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@bagder bagder closed this in 6b552e6 Mar 7, 2026
@bagder bagder deleted the bagder/quiche-format branch March 7, 2026 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

HTTP/3 h3 or quic related

Development

Successfully merging this pull request may close these issues.

2 participants