Browse code

core: safety check for finding select final node

Daniel-Constantin Mierla authored on 18/04/2014 22:21:09
Showing 1 changed files
... ...
@@ -385,6 +385,10 @@ int resolve_select(select_t* s)
385 385
 		}
386 386
 	}
387 387
 
388
+	if (t==NULL) {
389
+		BUG ("final node not found\n");
390
+		goto not_found;
391
+	}
388 392
 	if (t->table[table_idx].flags & SEL_PARAM_EXPECTED) {
389 393
 		BUG ("final node has SEL_PARAM_EXPECTED set (no more parameters available)\n");
390 394
 		goto not_found;