Skip to content

Conversation

@SivaPA08
Copy link

@SivaPA08 SivaPA08 commented Jan 12, 2026

Previously, the implementation only verified that (pos + len) did not exceed
bufferEnd, but it did not check whether pos was less than bufferStart.
Now it explicitly returns 0 when pos < bufferStart.
User may pass a buffer slice with a non-zero start offset or pos lesser than bufferStart. This change enforces the logical bounds of the buffer window .

Copy link
Member

@garydgregory garydgregory left a comment

Choose a reason for hiding this comment

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

Hello @SivaPA08

-1:

There are no tests to match your main changes. The description says:
"Fixes the Javadoc description of StrMatcher bufferStart and bufferEnd.": That's NOT what this PR does.
"No production code changes.": The PR changes main.

@SivaPA08 SivaPA08 changed the title [javadoc] Fix StrMatcher bufferStart and bufferEnd description Fix boundary check in StrMatcher.isMatch for bufferStart Jan 12, 2026
@SivaPA08 SivaPA08 requested a review from garydgregory January 12, 2026 14:42
@SivaPA08 SivaPA08 closed this by deleting the head repository Jan 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants