diff options
author | 2005-05-19 08:40:59 +0000 | |
---|---|---|
committer | 2005-05-19 08:40:59 +0000 | |
commit | e242c0149b4f98a98a81e546324d17e592f539d0 (patch) | |
tree | 22735b6c539b130be298272b3eef4c28ba12c90d /usr.bin/nc/socks.c | |
parent | .Xr getitimer 2 , (diff) | |
download | wireguard-openbsd-e242c0149b4f98a98a81e546324d17e592f539d0.tar.xz wireguard-openbsd-e242c0149b4f98a98a81e546324d17e592f539d0.zip |
fix SOCKS5 code for case where data comes in the same packet as the response;
ok dtucker@ markus@
Diffstat (limited to 'usr.bin/nc/socks.c')
-rw-r--r-- | usr.bin/nc/socks.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/nc/socks.c b/usr.bin/nc/socks.c index 31721ccd242..c665ea731a8 100644 --- a/usr.bin/nc/socks.c +++ b/usr.bin/nc/socks.c @@ -1,4 +1,4 @@ -/* $OpenBSD: socks.c,v 1.11 2005/05/19 04:29:46 djm Exp $ */ +/* $OpenBSD: socks.c,v 1.12 2005/05/19 08:40:59 djm Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist. All rights reserved. @@ -163,7 +163,7 @@ socks_connect(const char *host, const char *port, errx(1, "short write, %d (expected 10)", cnt); /* XXX Handle short reads better */ - cnt = read(proxyfd, buf, sizeof buf); + cnt = read(proxyfd, buf, 10); if (cnt == -1) err(1, "read failed"); if (cnt != 10) |