Fix path / crash

FossilOrigin-Name: babf8b543e34d304310ef1444e435ffb524ed651b5ef5f917f0fd00488e284a7
This commit is contained in:
me@ow.nekobit.net 2022-04-05 22:50:04 +00:00
parent cff674a103
commit 0d6328fa98

View file

@ -62,11 +62,25 @@ int parse_path(struct session* ssn,
tmp = NULL;
str_size = 0;
}
else if (state == PARSE_NEUTRAL) {
if (p[j] == p2[i])
break;
else {
fail = 1;
goto breakpt;
}
}
if (fin) goto breakpt;
break;
case ':':
state = PARSE_READ;
/* Abort early */
if (p2[j] == '\0')
{
fail = 1;
goto breakpt;
}
// fall
default:
if (state == PARSE_NEUTRAL)