[PATCH] iscsi: fix invalid memory access in isns_init

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks to Arne Redlich.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@xxxxxxxxxxxxx>
---
 usr/iscsi/isns.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/usr/iscsi/isns.c b/usr/iscsi/isns.c
index d0a86a6..cdc2ece 100644
--- a/usr/iscsi/isns.c
+++ b/usr/iscsi/isns.c
@@ -925,7 +925,7 @@ int isns_init(void)
 		eprintf("getaddrinfo error %s\n", isns_addr);
 		return -1;
 	}
-	memcpy(&ss, res->ai_addr, sizeof(ss));
+	memcpy(&ss, res->ai_addr, sizeof(*res->ai_addr));
 	freeaddrinfo(res);
 
 	rxbuf = calloc(2, BUFSIZE);
-- 
1.6.5

--
To unsubscribe from this list: send the line "unsubscribe stgt" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux SCSI]     [Linux RAID]     [Linux Clusters]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]

  Powered by Linux