Skip to content

protocol.h: fix the CURLPROTO_MASK#21031

Closed
bagder wants to merge 2 commits intomasterfrom
bagder/proto-mask
Closed

protocol.h: fix the CURLPROTO_MASK#21031
bagder wants to merge 2 commits intomasterfrom
bagder/proto-mask

Conversation

@bagder
Copy link
Copy Markdown
Member

@bagder bagder commented Mar 20, 2026

It had an 'f' too few

Follow-up to cd5ca80

Spotted by Codex Security

Test case 3219 added to catch this next time.

It had an 'f' too few

Follow-up to cd5ca80

Spotted by Codex Security

Test case 3219 added to catch this next time.
@github-actions github-actions bot added the tests label Mar 20, 2026
@bagder bagder marked this pull request as ready for review March 20, 2026 13:07
@bagder bagder changed the title protcol.h: fix the CURLPROTO_MASK protocol.h: fix the CURLPROTO_MASK Mar 20, 2026
@bagder bagder requested a review from Copilot March 20, 2026 14:50
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

Fixes an incorrect CURLPROTO_MASK value in lib/protocol.h (missing one hex f) and adds a unit test to prevent regressions, as a follow-up to the earlier change referenced in the PR description.

Changes:

  • Correct CURLPROTO_MASK from 0x3ffffff to 0x3fffffff to include all public protocol bits up to CURLPROTO_GOPHERS (bit 29).
  • Add unit test unit3219 plus the corresponding test spec test3219.
  • Wire the new test into the unit and data test makefiles.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
lib/protocol.h Fixes the protocol bitmask to include all intended public protocol bits.
tests/unit/unit3219.c Adds assertions validating mask inclusion/exclusion for key protocol bits.
tests/unit/Makefile.inc Registers the new unit test source in the unit test bundle.
tests/data/test3219 Adds the test case definition for the new unit test.
tests/data/Makefile.am Includes test3219 in the autotools test case list.

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

@bagder
Copy link
Copy Markdown
Member Author

bagder commented Mar 20, 2026

For the record, I think this is overzealous:


tests/unit/unit1627.c: line 89: '}' preceded by empty line

@bagder bagder closed this in f2ba8f0 Mar 20, 2026
@bagder bagder deleted the bagder/proto-mask branch March 20, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Development

Successfully merging this pull request may close these issues.

2 participants