Issue 105: Fix NULL dereferencing in regexp compiler.

"x(?:)" parses to Cat(Char(x), Empty), but the compiler couldn't handle
an empty right hand side of the Cat node.
This commit is contained in:
Tor Andersson
2019-06-11 15:48:26 +02:00
parent eeea83a807
commit e2b59201d5

View File

@@ -637,10 +637,10 @@ static void compile(Reprog *prog, Renode *node)
Reinst *inst, *split, *jump;
int i;
loop:
if (!node)
return;
loop:
switch (node->type) {
case P_CAT:
compile(prog, node->x);