8160303: parse_method_pattern only scans 254 chars

Fix wrong scan length

Reviewed-by: kvn, redestad
This commit is contained in:
Nils Eliasson 2017-10-11 11:22:21 +02:00
parent c5e0971547
commit e78ae6ba6c

View File

@ -288,7 +288,7 @@ void MethodMatcher::parse_method_pattern(char*& line, const char*& error_msg, Me
line++;
sig[0] = '(';
// scan the rest
if (1 == sscanf(line, "%254[[);/" RANGEBASE "]%n", sig+1, &bytes_read)) {
if (1 == sscanf(line, "%1022[[);/" RANGEBASE "]%n", sig+1, &bytes_read)) {
if (strchr(sig, '*') != NULL) {
error_msg = " Wildcard * not allowed in signature";
return;