Skip to contentSkip to conversation

LVM2 ./WHATS_NEW lib/config/config.c

PATCH [email protected] 1 participant 1 message Jan 17, 2007

lore
Share & tools
lore
#0 lore raw

CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: agk at sourceware.org 2007-01-17 16:22:59

Modified files:
. : WHATS_NEW
lib/config : config.c

Log message:
Fix a segfault if an empty config file section encountered.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.543&r2=1.544
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/lib/config/config.c.diff?cvsroot=lvm2&r1=1.51&r2=1.52

WHATS_NEW +1 -0
@@ -1,5 +1,6 @@
 Version 2.02.19 - 
 ===================================
+  Fix a segfault if an empty config file section encountered.
   Move basic reporting functions into libdevmapper.
   Fix partition table processing after sparc changes (2.02.16).
   Fix cmdline PE range processing segfault (2.02.13).
lib/config/config.c +1 -1
@@ -853,7 +853,7 @@
 	const struct config_node *n = _find_first_config_node(cn1, cn2, path);
 
 	/* Empty strings are ignored */
-	if ((n && n->v->type == CFG_STRING) && (*n->v->v.str)) {
+	if ((n && n->v && n->v->type == CFG_STRING) && (*n->v->v.str)) {
 		log_very_verbose("Setting %s to %s", path, n->v->v.str);
 		return n->v->v.str;
 	}