summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2014-07-02 15:36:54 +0000
committert00fcxen <t00fcxen@9df1edf5-d72c-5b5f-11c0-5f5209eb73f7>2014-07-02 15:36:54 +0000
commit03b9c0e3f35b2301d0c462a8a0f9f43f3ccd6d93 (patch)
tree4ccb33b4b372b22bffe512a9cbe504913a99e3d8
parent6c632b3f6e570981666f8a3ff4be34eaf1735835 (diff)
downloadusrsctplib-03b9c0e3f35b2301d0c462a8a0f9f43f3ccd6d93.tar.gz
Fix the bug reported in
https://code.google.com/p/sctp-refimpl/issues/detail?id=4 by taking the proposed fix. Thanks to 12maksqwe for reporting the issue. git-svn-id: http://sctp-refimpl.googlecode.com/svn/trunk/KERN/usrsctp/usrsctplib@8911 9df1edf5-d72c-5b5f-11c0-5f5209eb73f7
-rwxr-xr-xnetinet/sctp_userspace.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/netinet/sctp_userspace.c b/netinet/sctp_userspace.c
index e0cbac4..7763f30 100755
--- a/netinet/sctp_userspace.c
+++ b/netinet/sctp_userspace.c
@@ -141,7 +141,7 @@ Win_getifaddrs(struct ifaddrs** interfaces)
ifa->ifa_name = strdup(pAdapt->AdapterName);
ifa->ifa_flags = pAdapt->Flags;
ifa->ifa_addr = (struct sockaddr *)addr;
- memcpy(&addr, &pAdapt->FirstUnicastAddress->Address.lpSockaddr, sizeof(struct sockaddr_in));
+ memcpy(addr, &pAdapt->FirstUnicastAddress->Address.lpSockaddr, sizeof(struct sockaddr_in));
interfaces[count] = ifa;
}
#endif
@@ -175,7 +175,7 @@ Win_getifaddrs(struct ifaddrs** interfaces)
ifa->ifa_name = strdup(pAdapt->AdapterName);
ifa->ifa_flags = pAdapt->Flags;
ifa->ifa_addr = (struct sockaddr *)addr6;
- memcpy(&addr6, &pAdapt->FirstUnicastAddress->Address.lpSockaddr, sizeof(struct sockaddr_in6));
+ memcpy(addr6, &pAdapt->FirstUnicastAddress->Address.lpSockaddr, sizeof(struct sockaddr_in6));
interfaces[count] = ifa;
}
}