Module: sip-router
Branch: master
Commit: 1ff6c9a7fbbc9369d0d240587b21857a4888c47a
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=1ff6c9a…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: Sun Jul 19 17:37:22 2009 +0200
dispatcher(k): safety checks for duri
- due to usage of SR append_branch() instead of km_append_branch(), duri
has to be checked before giving inner fields as parameters
---
modules_k/dispatcher/dispatch.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/modules_k/dispatcher/dispatch.c b/modules_k/dispatcher/dispatch.c
index b26c2f8..ff260f9 100644
--- a/modules_k/dispatcher/dispatch.c
+++ b/modules_k/dispatcher/dispatch.c
@@ -1061,7 +1061,8 @@ static inline int ds_update_dst(struct sip_msg *msg, str *uri, int
mode)
}
if(ds_append_branch!=0 && route_type==FAILURE_ROUTE)
{
- if (append_branch(msg, 0, 0, duri->s, duri->len, Q_UNSPECIFIED, 0)!=1 )
+ if (append_branch(msg, 0, 0, (duri)?duri->s:0, (duri)?duri->len:0,
+ Q_UNSPECIFIED, 0)!=1 )
{
LM_ERR("append_branch action failed\n");
return -1;