Skip to content

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Oct 4, 2025

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
Copy link
Member

bagder commented Oct 4, 2025

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