diff options
| author | tedu <> | 2014-06-10 16:23:07 +0000 |
|---|---|---|
| committer | tedu <> | 2014-06-10 16:23:07 +0000 |
| commit | 7958ee57e3a5acbbe3ef2dfccbbbd44a71aa0690 (patch) | |
| tree | c8675f58e05aa9bf8fc4868357df15aacc760abc /src | |
| parent | b147e3087c995acd3d243bd1df04a843ea6babbc (diff) | |
| download | openbsd-7958ee57e3a5acbbe3ef2dfccbbbd44a71aa0690.tar.gz openbsd-7958ee57e3a5acbbe3ef2dfccbbbd44a71aa0690.tar.bz2 openbsd-7958ee57e3a5acbbe3ef2dfccbbbd44a71aa0690.zip | |
increase buffer size to 64k, and actually use it. ok deraadt
from John-Mark Gurney
Diffstat (limited to '')
| -rw-r--r-- | src/usr.bin/nc/netcat.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/usr.bin/nc/netcat.c b/src/usr.bin/nc/netcat.c index 1454dd7b90..2861948dbf 100644 --- a/src/usr.bin/nc/netcat.c +++ b/src/usr.bin/nc/netcat.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: netcat.c,v 1.119 2014/05/20 01:25:23 guenther Exp $ */ | 1 | /* $OpenBSD: netcat.c,v 1.120 2014/06/10 16:23:07 tedu Exp $ */ |
| 2 | /* | 2 | /* |
| 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> | 3 | * Copyright (c) 2001 Eric Jackson <ericj@monkey.org> |
| 4 | * | 4 | * |
| @@ -733,12 +733,12 @@ void | |||
| 733 | readwrite(int nfd) | 733 | readwrite(int nfd) |
| 734 | { | 734 | { |
| 735 | struct pollfd pfd[2]; | 735 | struct pollfd pfd[2]; |
| 736 | unsigned char buf[16384]; | 736 | unsigned char buf[64 * 1024]; |
| 737 | int n, wfd = fileno(stdin); | 737 | int n, wfd = fileno(stdin); |
| 738 | int lfd = fileno(stdout); | 738 | int lfd = fileno(stdout); |
| 739 | int plen; | 739 | int plen; |
| 740 | 740 | ||
| 741 | plen = 2048; | 741 | plen = sizeof(buf); |
| 742 | 742 | ||
| 743 | /* Setup Network FD */ | 743 | /* Setup Network FD */ |
| 744 | pfd[0].fd = nfd; | 744 | pfd[0].fd = nfd; |
