Do not overwrite the leading '8'. Signed-off-by: Martin Wilck <mwilck@xxxxxxxx> --- libmultipath/discovery.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libmultipath/discovery.c b/libmultipath/discovery.c index 10306b22..45c2931e 100644 --- a/libmultipath/discovery.c +++ b/libmultipath/discovery.c @@ -1037,12 +1037,11 @@ parse_vpd_pg83(const unsigned char *in, size_t in_len, } } else { out[0] = '8'; - len = 1; vpd += 4; vpd_len -= 4; if (vpd_len > out_len - 2) vpd_len = out_len - 2; - memcpy(out, vpd, vpd_len); + memcpy(out + 1, vpd, vpd_len); len = vpd_len + 1; out[len] = '\0'; } -- 2.21.0 -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel