Skip to content

Fix variable check error in str.h#2293

Open
wu-zhao-min wants to merge 1 commit into
mongodb:masterfrom
wu-zhao-min:master
Open

Fix variable check error in str.h#2293
wu-zhao-min wants to merge 1 commit into
mongodb:masterfrom
wu-zhao-min:master

Conversation

@wu-zhao-min
Copy link
Copy Markdown

Correct line 1080 in str.h by changing okay = !!needle_dup.data to okay = !!sub_dup.data .
This ensures the result of the sub string duplication is checked correctly, preventing potential null pointer dereferences or the use of uninitialized memory caused by a copy-paste error.

@wu-zhao-min wu-zhao-min requested a review from a team as a code owner May 8, 2026 10:10
@wu-zhao-min wu-zhao-min requested a review from rcsanchez97 May 8, 2026 10:11
@kevinAlbs kevinAlbs requested review from vector-of-bool and removed request for rcsanchez97 May 8, 2026 11:46
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.

1 participant