diff options
author | cvs2svn <cvs2svn@FreeBSD.org> | 2008-12-19 21:12:36 +0000 |
---|---|---|
committer | cvs2svn <cvs2svn@FreeBSD.org> | 2008-12-19 21:12:36 +0000 |
commit | 616aaf4b1fc83a87f7a49e0e81e8f7c9db6dbcad (patch) | |
tree | eca5ff8ef89030731d682a14daebcc8cbd2245ac /security/krb5-16/files/patch-appl::telnet::telnetd::utility.c | |
parent | 856c5bf9f133ae5d553d972d5a940586d3f56048 (diff) |
This commit was manufactured by cvs2svn to create tag 'RELEASE_7_1_0'.release/7.1.0
Notes
Notes:
svn path=/head/; revision=224474
svn path=/tags/RELEASE_7_1_0/; revision=224475; tag=release/7.1.0
Diffstat (limited to 'security/krb5-16/files/patch-appl::telnet::telnetd::utility.c')
-rw-r--r-- | security/krb5-16/files/patch-appl::telnet::telnetd::utility.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/security/krb5-16/files/patch-appl::telnet::telnetd::utility.c b/security/krb5-16/files/patch-appl::telnet::telnetd::utility.c deleted file mode 100644 index 8bb656dc0673..000000000000 --- a/security/krb5-16/files/patch-appl::telnet::telnetd::utility.c +++ /dev/null @@ -1,38 +0,0 @@ ---- appl/telnet/telnetd/utility.c.orig Wed Jan 9 14:26:59 2002 -+++ appl/telnet/telnetd/utility.c Fri Jan 11 13:10:33 2002 -@@ -408,18 +408,25 @@ - int - netwrite(const char *buf, size_t len) - { -- size_t remain; -+ int remaining, copied; -+ -+ remaining = BUFSIZ - (nfrontp - netobuf); -+ while (len > 0) { -+ /* Free up enough space if the room is too low*/ -+ if ((len > BUFSIZ ? BUFSIZ : len) > remaining) { -+ netflush(); -+ remaining = BUFSIZ - (nfrontp - netobuf); -+ } - -- remain = sizeof(netobuf) - (nfrontp - netobuf); -- if (remain < len) { -- netflush(); -- remain = sizeof(netobuf) - (nfrontp - netobuf); -+ /* Copy out as much as will fit */ -+ copied = remaining > len ? len : remaining; -+ memmove(nfrontp, buf, copied); -+ nfrontp += copied; -+ len -= copied; -+ remaining -= copied; -+ buf += copied; - } -- if (remain < len) -- return 0; -- memcpy(nfrontp, buf, len); -- nfrontp += len; -- return len; -+ return copied; - } - - /* |