openbsd-ports/security/zebedee/patches/patch-zebedee_c
lebel c0fa360ea7 initial import security/zebedee 2.2.2:
--
Zebedee is a simple program to establish an encrypted, compressed TCP or
UDP tunnel between two systems. This allows traffic such as telnet, ftp,
VNC, and X to be protected from snooping as well as potentially gaining
performance over low-bandwidth networks from compression.

WWW: http://www.winton.org.uk/zebedee/

Submitted by Jon Leonard <jleonard@iss.net>
2001-10-31 18:04:54 +00:00

37 lines
1.2 KiB
Plaintext

$OpenBSD: patch-zebedee_c,v 1.1.1.1 2001/10/31 18:04:54 lebel Exp $
--- zebedee.c.orig Fri Apr 13 16:42:24 2001
+++ zebedee.c Wed Oct 31 10:44:58 2001
@@ -940,7 +940,7 @@ message(unsigned short level, int err, c
** error number!
*/
- sprintf(msgBuf, "%s(%lu/%lu): %s%s%.*s%s",
+ sprintf(msgBuf, "%.64s(%lu/%lu): %s%s%.*s%s",
Program, (threadPid() % 100000), (threadTid() % 100000),
(timePtr ? timePtr : ""), (timePtr ? ": " : ""),
level, " ", (level ? "" : "ERROR: "));
@@ -2969,7 +2969,7 @@ spawnCommand(unsigned short port, char *
char *shell = DFLT_SHELL;
char cmdBuf[MAX_LINE_SIZE];
- sprintf(cmdBuf, cmdFormat, (int)port);
+ snprintf(cmdBuf, sizeof(cmdBuf), cmdFormat, (int)port);
if (((shell = getenv("SHELL")) == NULL) || *shell == '\0')
{
@@ -3105,8 +3105,12 @@ filterLoop(int localFd, int remoteFd, Ms
}
else
{
- num = send(localFd, (char *)(msgBuf->data),
- msgBuf->size, 0);
+ int i;
+ num = 0;
+ do
+ {
+ i = send(localFd, (char *)(msgBuf->data)+num, msgBuf->size-num, 0);
+ } while ((i != -1) && ((num+=i) < msgBuf->size));
}
if (num != msgBuf->size)
{