This is the mail archive of the lvm2-cvs@sourceware.org mailing list for the LVM2 project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

LVM2/daemons/clvmd lvm-functions.c


CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	pcaulfield@sourceware.org	2006-10-06 10:06:37

Modified files:
	daemons/clvmd  : lvm-functions.c 

Log message:
	Use strncpy rather than strcpy

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/daemons/clvmd/lvm-functions.c.diff?cvsroot=lvm2&r1=1.23&r2=1.24

--- LVM2/daemons/clvmd/lvm-functions.c	2006/10/05 13:55:50	1.23
+++ LVM2/daemons/clvmd/lvm-functions.c	2006/10/06 10:06:37	1.24
@@ -537,7 +537,8 @@
 	if (level != _LOG_ERR && level != _LOG_FATAL)
 		return;
 
-	strcpy(last_error, message);
+	strncpy(last_error, message, sizeof(last_error));
+	last_error[sizeof(last_error)-1] = '\0';
 }
 
 /* This checks some basic cluster-LVM configuration stuff */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]