diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2005-05-19 08:41:00 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2005-05-19 08:41:00 +0000 |
commit | 188a70fd56d27ebbcd9baccf8b8d2fb86f89808d (patch) | |
tree | b45f3ad8ca5cc7e62156b721e3ecfa4668be6ebd | |
parent | 593c3eda2d43a91bbc571f6d7f76e8055b106463 (diff) |
fix SOCKS5 code for case where data comes in the same packet as the response;
ok dtucker@ markus@
-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) |