Guard NULL property matches and harden name_match

This commit is contained in:
Mario Fetka
2026-04-20 23:39:42 +02:00
parent 5feaf88b2b
commit ae20893723
2 changed files with 5 additions and 2 deletions

View File

@@ -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 */