2
0
Эх сурвалжийг харах

core: switch.c Fixed dereference of null pointer

c->ct_rve is NULL in else branch, further deref. will cause chaos.
Marius Zbihlei 14 жил өмнө
parent
commit
ef82d90bec
1 өөрчлөгдсөн 1 нэмэгдсэн , 4 устгасан
  1. 1 4
      switch.c

+ 1 - 4
switch.c

@@ -220,10 +220,7 @@ int fix_switch(struct action* t)
 			n++; /* count only non-default cases */
 		}else{
 			if (default_found){
-				LOG(L_ERR, "ERROR: fix_switch: more then one \"default\""
-						" label found (%d, %d)\n",
-						c->ct_rve->fpos.s_line,
-						c->ct_rve->fpos.s_col);
+				LOG(L_ERR, "ERROR: fix_switch: more then one \"default\"");
 				return E_UNSPEC;
 			}
 			default_found=1;