[sr-dev] git:kamailio_3.0: presence_dialoginfo(k): don' t exeed array size in error case

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 12 11:34:38 CEST 2010


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date:   Fri Jul 30 23:29:43 2010 +0200

presence_dialoginfo(k): don't exeed array size in error case

- error handling could get to the size of array as index, resulting in
  out of bounds operation
- patch by Marius-Ovidiu Bucur
(cherry picked from commit 48f3159cdcc9ef06114a6d8f853687dc1338a8f0)

---

 modules_k/presence_dialoginfo/notify_body.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules_k/presence_dialoginfo/notify_body.c b/modules_k/presence_dialoginfo/notify_body.c
index 965cef0..efa3b45 100644
--- a/modules_k/presence_dialoginfo/notify_body.c
+++ b/modules_k/presence_dialoginfo/notify_body.c
@@ -264,7 +264,7 @@ str* agregate_xmls(str* pres_user, str* pres_domain, str** body_array, int n)
 error:
 	if(xml_array!=NULL)
 	{
-		for(i=0; i<=j; i++)
+		for(i=0; i<j; i++)
 		{
 			if(xml_array[i]!=NULL)
 				xmlFreeDoc( xml_array[i]);




More information about the sr-dev mailing list