You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.p...

14 lines
442 B

diff --git a/src/inaddr.cpp b/src/inaddr.cpp
index 5a4b9c4..50127f3 100644
--- a/src/inaddr.cpp
+++ b/src/inaddr.cpp
@@ -333,7 +333,7 @@ void IPV4Address::setAddress(const char *host)
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in_addr[1];
- memset((void *)&ipaddr[0], 0, sizeof(ipaddr));
+ memset((void *)&ipaddr[0], 0, sizeof(*ipaddr));
return;
}