Module: sip-router
Branch: 3.3
Commit: 835db0ecde6f401bd77b55e3499fa7cfe452b7ea
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=835db0ecde6f401bd77b55e3499fa7cfe452b7ea

Author: Daniel-Constantin Mierla <[email protected]>
Committer: Daniel-Constantin Mierla <[email protected]>
Date:   Sun Nov 25 21:54:32 2012 +0100

dialog(k): safety check for callid parameter in mi commands

- if not provided properly, it may result in crash
- reported by Ricardo Martinez
(cherry picked from commit 8acb59ee4de31ab76763a021acaf7b5a13e02f23)

---

 modules_k/dialog/dlg_hash.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/modules_k/dialog/dlg_hash.c b/modules_k/dialog/dlg_hash.c
index 9010139..28468b3 100644
--- a/modules_k/dialog/dlg_hash.c
+++ b/modules_k/dialog/dlg_hash.c
@@ -1174,6 +1174,8 @@ static inline struct mi_root* process_mi_params(struct 
mi_root *cmd_tree,
 
        /* we have params -> get callid and fromtag */
        callid = &node->value;
+       if(callid->s==NULL || callid->len<=0)
+               return init_mi_tree(400, MI_SSTR(MI_MISSING_PARM));
        LM_DBG("callid='%.*s'\n", callid->len, callid->s);
 
        node = node->next;


_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to