Skip to content

Commit

Permalink
Merge branch 'frida:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
hexploitable authored Oct 14, 2024
2 parents 14f4e0b + 0afeb85 commit af5d828
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions gum/gummemory.c
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@ gum_match_pattern_new_from_regex (const gchar * regex_str)
GumMatchPattern * pattern;
GRegex * regex;

regex = g_regex_new (regex_str, G_REGEX_OPTIMIZE, G_REGEX_MATCH_NOTEMPTY,
NULL);
regex = g_regex_new (regex_str, G_REGEX_OPTIMIZE | G_REGEX_RAW,
G_REGEX_MATCH_NOTEMPTY, NULL);
if (regex == NULL)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion releng
Submodule releng updated 2 files
+4 −4 deps.toml
+1 −1 meson
16 changes: 16 additions & 0 deletions tests/gumjs/script.c
Original file line number Diff line number Diff line change
Expand Up @@ -8139,6 +8139,22 @@ TESTCASE (memory_can_be_scanned_with_match_pattern_object)
EXPECT_SEND_MESSAGE_WITH ("\"onMatch offset=0 size=11\"");
EXPECT_SEND_MESSAGE_WITH ("\"onMatch offset=13 size=11\"");
EXPECT_SEND_MESSAGE_WITH ("\"onComplete\"");

haystack2[7] = 0xd1;

COMPILE_AND_LOAD_SCRIPT (
"const pattern = new MatchPattern(/Hello/.toString());"
"Memory.scan(" GUM_PTR_CONST ", 33, pattern, {"
"onMatch(address, size) {"
" send('onMatch offset=' + address.sub(" GUM_PTR_CONST
").toInt32() + ' size=' + size);"
"},"
"onComplete() {"
" send('onComplete');"
"}"
"});", haystack2, haystack2);
EXPECT_SEND_MESSAGE_WITH ("\"onMatch offset=0 size=5\"");
EXPECT_SEND_MESSAGE_WITH ("\"onComplete\"");
}

TESTCASE (memory_can_be_scanned_synchronously)
Expand Down

0 comments on commit af5d828

Please sign in to comment.