iscsi-initiator-utils/iscsi-initiator-utils-check-targetname-len.patch

14 lines
520 B
Diff

--- open-iscsi-6.2.0.695/usr/initiator.c 2006-10-13 13:06:54.000000000 -0500
+++ open-iscsi-6.2.0.695.work/usr/initiator.c 2006-10-13 13:12:12.000000000 -0500
@@ -1533,6 +1533,10 @@ static int match_session(void *data, cha
if (!p)
return 0;
+ if (strlen(rec->name) != strlen(targetname) ||
+ strlen(rec->conn[0].address) != strlen(address))
+ return 0;
+
if (!strcmp(rec->transport_name, p->name) &&
!strncmp(rec->name, targetname, strlen(rec->name)) &&
!strncmp(rec->conn[0].address, address,