Module: sip-router
Branch: master
Commit: 0e8978b8853d44f6de3fb0a2bfcf9eef2d543372
URL:
http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=0e8978b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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();