Module: sip-router Branch: master Commit: ef82d90bec5d06ae53c202300a553ea7e09b0d27 URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=ef82d90b...
Author: Marius Zbihlei marius.zbihlei@1and1.ro Committer: Marius Zbihlei marius.zbihlei@1and1.ro Date: Fri Jan 14 19:10:08 2011 +0200
core: switch.c Fixed dereference of null pointer
c->ct_rve is NULL in else branch, further deref. will cause chaos.
---
switch.c | 5 +---- 1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/switch.c b/switch.c index 467e00c..b09d8ae 100644 --- a/switch.c +++ b/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;