Guard NULL property matches and harden name_match
This commit is contained in:
@@ -706,6 +706,9 @@ int name_match(uint8 *s, uint8 *p)
|
||||
/* simple match routine matches '?' and '*' */
|
||||
{
|
||||
uint8 pc;
|
||||
if (!s || !p)
|
||||
return(0);
|
||||
|
||||
while ( (pc = *p++) != 0){
|
||||
switch (pc) {
|
||||
case '?' : if (!*s++) return(0); /* simple char */
|
||||
|
||||
Reference in New Issue
Block a user