Module: sip-router Branch: 4.0 Commit: 817d5dfdd8fbae905c64c41672f197143b6f563c URL: http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=817d5dfd...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: Wed May 29 10:49:40 2013 +0200
topoh: safety check for Via header when removed from script
- reported by Guillaume Bour, FS#300 (cherry picked from commit b480ac55508e5d9b92cc9560e0b1d338d04f3b11)
---
modules/topoh/th_msg.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/modules/topoh/th_msg.c b/modules/topoh/th_msg.c index df29ea1..4d25750 100644 --- a/modules/topoh/th_msg.c +++ b/modules/topoh/th_msg.c @@ -967,6 +967,11 @@ int th_del_via_cookie(sip_msg_t *msg, struct via_body *via) { struct via_param *p; struct lump* l; + + if(via==NULL) { + LM_DBG("no via header\n"); + return 0; + } for(p=via->param_lst; p; p=p->next) { if(p->name.len==th_cookie_name.len