summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbeck <beck@openbsd.org>2003-05-16 22:30:15 +0000
committerbeck <beck@openbsd.org>2003-05-16 22:30:15 +0000
commita4832aaa3e66319545b824b71ab45fb8b56448b2 (patch)
tree8aa8d4fabbaf14060071992dba7314245c8cc2d5
parentClean up low-level sparc register access wrappers. Specify clobbers for (diff)
downloadwireguard-openbsd-a4832aaa3e66319545b824b71ab45fb8b56448b2.tar.xz
wireguard-openbsd-a4832aaa3e66319545b824b71ab45fb8b56448b2.zip
This was using the wrong buffer, and wrong lengths. fix it from me and
tedu, ok tedu@
-rw-r--r--libexec/spamd/spamd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index dfbc19c3c2a..37ae586a408 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.32 2003/04/15 07:16:14 deraadt Exp $ */
+/* $OpenBSD: spamd.c,v 1.33 2003/05/16 22:30:15 beck Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -655,7 +655,7 @@ void
handler(struct con *cp)
{
int end = 0;
- int i, n;
+ int n;
if (cp->r) {
n = read(cp->fd, cp->ip, cp->il);
@@ -666,10 +666,10 @@ handler(struct con *cp)
perror("read()");
closecon(cp);
} else {
+ cp->ip[n] = '\0';
if (cp->rend[0])
- for (i = 0; i < n; i++)
- if (strchr(cp->rend, cp->op[i]))
- end = 1;
+ if (strpbrk(cp->ip, cp->rend))
+ end = 1;
cp->ip += n;
cp->il -= n;
}