mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-25 13:54:38 +02:00
8069389: CompilerOracle prefix wildcarding is broken for long strings
Replace strcpy with memmove Reviewed-by: kvn
This commit is contained in:
parent
21e2e5ffc0
commit
01ec695002
2 changed files with 80 additions and 1 deletions
|
@ -553,7 +553,8 @@ static MethodMatcher::Mode check_mode(char name[], const char*& error_msg) {
|
|||
int match = MethodMatcher::Exact;
|
||||
while (name[0] == '*') {
|
||||
match |= MethodMatcher::Suffix;
|
||||
strcpy(name, name + 1);
|
||||
// Copy remaining string plus NUL to the beginning
|
||||
memmove(name, name + 1, strlen(name + 1) + 1);
|
||||
}
|
||||
|
||||
if (strcmp(name, "*") == 0) return MethodMatcher::Any;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue