util: extend string search with user-defined printable characters#6161
Open
cheese-cakee wants to merge 3 commits intorizinorg:devfrom
Open
util: extend string search with user-defined printable characters#6161cheese-cakee wants to merge 3 commits intorizinorg:devfrom
cheese-cakee wants to merge 3 commits intorizinorg:devfrom
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
Rot127
requested changes
Apr 7, 2026
Contributor
Author
|
ready for review @Rot127 |
Rot127
requested changes
Apr 10, 2026
Comment on lines
+4266
to
+4271
| const RzCodePoint *user_unprintable = (const RzCodePoint *)rz_vector_head(option->user_unprintable); | ||
| for (size_t i = 0, count = rz_vector_len(option->user_unprintable); i < count; i++) { | ||
| if (user_unprintable[i] == cp) { | ||
| return true; | ||
| } | ||
| } |
Member
There was a problem hiding this comment.
Please use rz_vector_foreach It is way cleaner.
Comment on lines
+96
to
+101
| const RzCodePoint *user_unprintable = (const RzCodePoint *)rz_vector_head(opt->user_unprintable); | ||
| for (size_t i = 0, count = rz_vector_len(opt->user_unprintable); i < count; i++) { | ||
| if (user_unprintable[i] == cp) { | ||
| return true; | ||
| } | ||
| } |
| * \param user_unprintable Array of user-defined non-printable code points. | ||
| * \param user_unprintable_count Number of user-defined non-printable code points. | ||
| */ | ||
| RZ_API bool rz_unicode_code_point_is_user_unprintable(const RzCodePoint c, const RzCodePoint *user_unprintable, size_t user_unprintable_count) { |
Member
There was a problem hiding this comment.
This function seems to be unused?
Member
There was a problem hiding this comment.
Please remove it then , if I am not mistaken.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Your checklist for this pull request
RZ_APIfunction and struct this PR changes.RZ_API).Detailed description
This PR extends the string search functionality in Rizin to allow users to define custom unprintable character sets via the new
str.unprintableconfiguration option.Users can specify a comma-separated list of Unicode code points to treat as non-printable:
Test plan
rizin -q -c < test/db/cmd/cmd_search_zClosing issues
closes #4930