Преглед изворни кода

core: safety check accessing variables in dbg message during fixup operation

(cherry picked from commit 0bda1dc8238f6be5bc83711e0439dabff39c9120)
(cherry picked from commit 94744ef0505268ea7e52a259f0f4636cb530e488)
Daniel-Constantin Mierla пре 11 година
родитељ
комит
b2324dcad3
1 измењених фајлова са 2 додато и 2 уклоњено
  1. 2 2
      switch.c

+ 2 - 2
switch.c

@@ -538,8 +538,8 @@ static int fix_match(struct action* t)
 			if (default_found){
 				LOG(L_ERR, "ERROR: fix_match: more then one \"default\""
 						" label found (%d, %d)\n",
-						c->ct_rve->fpos.s_line,
-						c->ct_rve->fpos.s_col);
+						(c->ct_rve)?c->ct_rve->fpos.s_line:0,
+						(c->ct_rve)?c->ct_rve->fpos.s_col:0);
 				ret=E_UNSPEC;
 				goto error;
 			}