This is the mail archive of the
lvm2-cvs@sourceware.org
mailing list for the LVM2 project.
LVM2/daemons/clvmd lvm-functions.c
- From: pcaulfield at sourceware dot org
- To: lvm2-cvs at sourceware dot org
- Date: 6 Oct 2006 10:06:37 -0000
- Subject: 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 */