Browse Source

Fix potential NULL dereference

Serj Kalichev 10 years ago
parent
commit
e3e690e2c6
1 changed files with 3 additions and 0 deletions
  1. 3 0
      lub/system/test.c

+ 3 - 0
lub/system/test.c

@@ -288,6 +288,9 @@ static int binop(void)
 	(void)t_lex(*++t_wp);
 	op = t_wp_op;
 
+	if (!op)
+		return 1;
+
 	if ((opnd2 = *++t_wp) == NULL)
 		syntax(op->op_text, "argument expected");