Skip to content

checksrc: fix possible endless loops/errors in the banned function logic - #18845

Closed
vszakats wants to merge 3 commits into
curl:masterfrom
vszakats:checksrcplus
Closed

checksrc: fix possible endless loops/errors in the banned function logic#18845
vszakats wants to merge 3 commits into
curl:masterfrom
vszakats:checksrcplus

Conversation

@vszakats

@vszakats vszakats commented Oct 4, 2025

Copy link
Copy Markdown
Member

By quoting the search expression to be replaced. This avoid the issue
when the code leading up to a banned function contained regex characters
that the script did not explicitly handle, e.g. +.

Assisted-by: Daniel Stenberg

Ref: https://perldoc.perl.org/functions/quotemeta
Follow-up to dd37d69 #18775


Is there a way to search and replace plain strings in Perl, without regexes?

@vszakats vszakats added the script label Oct 4, 2025
@bagder

bagder commented Oct 4, 2025

Copy link
Copy Markdown
Member

Is there a way to search and replace plain strings in Perl, without regexes?

No, but you may want to use quotemeta ?

@vszakats vszakats changed the title checksrc: fix endless loop if banned function is preceded by + checksrc: fix possible endless loops/errors in the banned function logic Oct 4, 2025
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