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