summaryrefslogtreecommitdiff
path: root/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch')
-rw-r--r--dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch b/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch
new file mode 100644
index 000000000000..e68b00576cdb
--- /dev/null
+++ b/dev-cpp/commoncpp2/files/1.8.1-fix-buffer-overflow.patch
@@ -0,0 +1,13 @@
+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;
+ }
+