[Openais] [PATCH corosync/trunk] Avoid array out of bound error.

angus salkeld angus.salkeld at alliedtelesis.co.nz
Wed Oct 14 15:57:51 PDT 2009


Avoid array out of bound error.

thanks Steve for debugging.
(sees to only crash on x86_64)

-Angus

Index: exec/coroipcs.c
===================================================================
--- exec/coroipcs.c	(revision 2528)
+++ exec/coroipcs.c	(working copy)
@@ -1457,7 +1457,7 @@
 
 	/* copy the name */
 	strncpy (out_name, name, name_len);
-	out_name[name_len] = '\0';
+	out_name[name_len - 1] = '\0';
 	return out_name;
 }
 




More information about the Openais mailing list