[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[lvm-devel] LVM2/libdm libdm-common.c



CVSROOT:	/cvs/lvm2
Module name:	LVM2
Changes by:	prajnoha sourceware org	2011-09-24 11:47:53

Modified files:
	libdm          : libdm-common.c 

Log message:
	readlink does not append a null byte to the output string!

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.126&r2=1.127

--- LVM2/libdm/libdm-common.c	2011/09/22 17:23:36	1.126
+++ LVM2/libdm/libdm-common.c	2011/09/24 11:47:53	1.127
@@ -1145,6 +1145,7 @@
 		log_sys_error("readlink", sysfs_path);
 		return 0;
 	}
+	temp_path[size] = '\0';
 
 	if (!(kernel_dev_name = strrchr(temp_path, '/'))) {
 		log_error("Could not locate device kernel name in sysfs path %s", temp_path);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]