Merge "res_ael: Fix pattern matching against literal '+'" into 16

This commit is contained in:
Joshua Colp 2019-04-16 07:25:48 -05:00 committed by Gerrit Code Review
commit 95dac45148
1 changed files with 5 additions and 10 deletions

View File

@ -759,10 +759,10 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
*r++ = '.';
*r++ = '*';
break;
case '*':
case '*': /* regex metacharacter */
case '+': /* regex metacharacter */
*r++ = '\\';
*r++ = '*';
break;
/* fall through */
default:
*r++ = *p;
break;
@ -792,14 +792,9 @@ static int extension_matches(pval *here, const char *exten, const char *pattern)
exten, pattern); */
return 1;
}
} else {
if ( strcmp(exten,pattern) == 0 ) {
return 1;
} else
return 0;
}
return 0;
}