29 lines
810 B
Diff
29 lines
810 B
Diff
From 2578838d077ecd7f4555e90df019053e7131e151 Mon Sep 17 00:00:00 2001
|
|
From: Martin Wilck <mwilck@suse.com>
|
|
Date: Tue, 8 Jan 2019 23:54:00 +0100
|
|
Subject: [PATCH] kpartx(coverity): fix apparent out-of-bounds access
|
|
|
|
This was a false positive.
|
|
|
|
Signed-off-by: Martin Wilck <mwilck@suse.com>
|
|
---
|
|
kpartx/dasd.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/kpartx/dasd.c b/kpartx/dasd.c
|
|
index fb358add..61b609a5 100644
|
|
--- a/kpartx/dasd.c
|
|
+++ b/kpartx/dasd.c
|
|
@@ -190,7 +190,7 @@ read_dasd_pt(int fd, struct slice all, struct slice *sp, int ns)
|
|
memcpy (&vlabel, data, sizeof(vlabel));
|
|
else {
|
|
bzero(&vlabel,4);
|
|
- memcpy (&vlabel.vollbl, data, sizeof(vlabel) - 4);
|
|
+ memcpy ((char *)&vlabel + 4, data, sizeof(vlabel) - 4);
|
|
}
|
|
vtoc_ebcdic_dec(vlabel.vollbl, type, 4);
|
|
|
|
--
|
|
2.11.0
|
|
|