Skip to contentSkip to conversation

hwtable.c segfault

PATCH New Mark Haverkamp 1 participant 1 message Jan 10, 2006 Device mapper

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 hwtable.c segfault

Christophe,

I built the latest git tree of the multipath tools and had a segfault starting multipath. I think that the increment of the hwe pointer is wrong. Here is a patch.

libmultipath/hwtable.c +1 -1
index a39520e..71728de 100644
@@ -462,7 +462,7 @@ setup_default_hwtable (vector hw)
 
 	while (hwe->vendor) {
 		r += store_hwe(hw, hwe);
-		hwe += sizeof(struct hwentry);
+		hwe++;
 	}
 	return r;
 }
Signature · 1 line
Mark Haverkamp <[email protected]>