[sr-dev] git:master: dialog (k): safety check of main_rt list boundaries

Daniel-Constantin Mierla miconda at gmail.com
Thu May 28 11:32:22 CEST 2009


Module: sip-router
Branch: master
Commit: 0e8978b8853d44f6de3fb0a2bfcf9eef2d543372
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0e8978b8853d44f6de3fb0a2bfcf9eef2d543372

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Thu May 28 12:31:10 2009 +0300

dialog (k): safety check of main_rt list boundaries

---

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

diff --git a/modules_k/dialog/dlg_handlers.c b/modules_k/dialog/dlg_handlers.c
index 0ebb4b1..f03951b 100644
--- a/modules_k/dialog/dlg_handlers.c
+++ b/modules_k/dialog/dlg_handlers.c
@@ -964,7 +964,8 @@ void dlg_ontimeout( struct dlg_tl *tl)
 	dlg = ((struct dlg_cell*)((char *)(tl) -
 		(unsigned long)(&((struct dlg_cell*)0)->tl)));
 
-	if(dlg->toroute>0 && main_rt.rlist[dlg->toroute]!=NULL)
+	if(dlg->toroute>0 && dlg->toroute<main_rt.entries
+			&& main_rt.rlist[dlg->toroute]!=NULL)
 	{
 		dlg_set_ctx_dialog(dlg);
 		fmsg = faked_msg_next();




More information about the sr-dev mailing list