Skip to contentSkip to conversation

LVM2 ./WHATS_NEW_DM libdm/libdm-common.c

PATCH [email protected] 1 participant 1 message Feb 13, 2012

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: zkabelac at sourceware.org 2012-02-13 10:49:28

Modified files:
. : WHATS_NEW_DM
libdm : libdm-common.c

Log message:
Do not write to -1 buffer address

In case of zero bytes would be read from sysfs, it would store '\0' on temp_buf[-1] address.

Simplify some buffer length calculation and use strcpy if we've just checked string fits in give buffer.

Replace jump label error: with bad: commonly used in libdm.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW_DM.diff?cvsroot=lvm2&r1=1.551&r2=1.552
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/libdm/libdm-common.c.diff?cvsroot=lvm2&r1=1.136&r2=1.137

WHATS_NEW_DM +1 -0
@@ -1,5 +1,6 @@
 Version 1.02.71 - 
 ====================================
+  Fix potential risk of writing in front of buffer in _sysfs_get_dm_name().
 
 Version 1.02.70 - 12th February 2012
 ====================================
libdm/libdm-common.c +25 -25

116 lines not on this page · raw message