Răsfoiți Sursa

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)
Daniel-Constantin Mierla 15 ani în urmă
părinte
comite
aa509c804d
1 a modificat fișierele cu 1 adăugiri și 1 ștergeri
  1. 1 1
      modules_k/presence_dialoginfo/notify_body.c

+ 1 - 1
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]);