summaryrefslogtreecommitdiff
path: root/usr.bin/nc/socks.c
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2019-11-04 17:33:29 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2019-11-04 17:33:29 +0000
commit0a482205ac54303127dddd629d4cd997f45c029c (patch)
tree17fa60b3d038011052d0d3a4264e2afb48f6f98c /usr.bin/nc/socks.c
parentc81ce811bf1456eec992a7226b910b4d6e9e11e9 (diff)
Fix an out of bound read/write when using a proxy.
From Lucas AT sexy DOT is. OK job@ kn@
Diffstat (limited to 'usr.bin/nc/socks.c')
-rw-r--r--usr.bin/nc/socks.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/nc/socks.c b/usr.bin/nc/socks.c
index 5ec5c95cd61..9766be7da49 100644
--- a/usr.bin/nc/socks.c
+++ b/usr.bin/nc/socks.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: socks.c,v 1.29 2019/07/29 15:19:03 benno Exp $ */
+/* $OpenBSD: socks.c,v 1.30 2019/11/04 17:33:28 millert Exp $ */
/*
* Copyright (c) 1999 Niklas Hallqvist. All rights reserved.
@@ -53,7 +53,7 @@
#define SOCKS_DOMAIN 3
#define SOCKS_IPV6 4
-int remote_connect(const char *, const char *, struct addrinfo);
+int remote_connect(const char *, const char *, struct addrinfo, char *);
int socks_connect(const char *, const char *, struct addrinfo,
const char *, const char *, struct addrinfo, int,
const char *);
@@ -201,7 +201,7 @@ socks_connect(const char *host, const char *port,
if (authretry++ > 3)
errx(1, "Too many authentication failures");
- proxyfd = remote_connect(proxyhost, proxyport, proxyhints);
+ proxyfd = remote_connect(proxyhost, proxyport, proxyhints, NULL);
if (proxyfd < 0)
return (-1);