openbsd-ports/x11/nx/nxcomp/patches/patch-Proxy_cpp
sebastia 9a0d2c7829 update nxcomp to NX 3.5.0
feedback and OK aja@
2012-01-03 16:35:28 +00:00

25 lines
760 B
Plaintext

$OpenBSD: patch-Proxy_cpp,v 1.3 2012/01/03 16:35:28 sebastia Exp $
fix bounds length warnings
--- Proxy.cpp.orig Wed Jun 1 18:04:37 2011
+++ Proxy.cpp Mon Jan 2 09:58:30 2012
@@ -23,7 +23,7 @@
#include "Misc.h"
-#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun)
+#if defined(__CYGWIN32__) || defined(__APPLE__) || defined(__FreeBSD__) || defined(__sun) || defined(__OpenBSD__)
#include <netinet/in_systm.h>
#endif
@@ -6267,7 +6267,7 @@ int Proxy::handleNewGenericConnectionFromProxy(int cha
serverAddrUnix.sun_family = AF_UNIX;
- const int serverAddrNameLength = 108;
+ const int serverAddrNameLength = SUN_LEN(&serverAddrUnix);
strncpy(serverAddrUnix.sun_path, path, serverAddrNameLength);