aboutsummaryrefslogtreecommitdiffstats
path: root/testing/libzookeeper/fix-sprintf-overflow.patch
diff options
context:
space:
mode:
Diffstat (limited to 'testing/libzookeeper/fix-sprintf-overflow.patch')
-rw-r--r--testing/libzookeeper/fix-sprintf-overflow.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/testing/libzookeeper/fix-sprintf-overflow.patch b/testing/libzookeeper/fix-sprintf-overflow.patch
new file mode 100644
index 0000000000..b0ea6db1e0
--- /dev/null
+++ b/testing/libzookeeper/fix-sprintf-overflow.patch
@@ -0,0 +1,11 @@
+--- a/src/zookeeper.c
++++ b/src/zookeeper.c
+@@ -3477,7 +3477,7 @@
+
+ static const char* format_endpoint_info(const struct sockaddr_storage* ep)
+ {
+- static char buf[128];
++ static char buf[128 + 6]; // include space for the port :xxxxx
+ char addrstr[128];
+ void *inaddr;
+ #ifdef WIN32