summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-02 20:49:11 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2003-03-02 20:49:11 +0000
commitb529c2f2dcdaa0db14c5fd8693b67ffc3e1caff6 (patch)
tree15d111782afd606b239c5fce46ba8db76196fc18 /libexec
parentf5c783889ab487d7145bc7b2be64f99cca3d71e9 (diff)
unbelievable; buffer mismanagement in new code
Diffstat (limited to 'libexec')
-rw-r--r--libexec/spamd/spamd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/libexec/spamd/spamd.c b/libexec/spamd/spamd.c
index 9d9fe6c1d4a..1f66cb2cced 100644
--- a/libexec/spamd/spamd.c
+++ b/libexec/spamd/spamd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spamd.c,v 1.13 2003/03/02 20:40:15 deraadt Exp $ */
+/* $OpenBSD: spamd.c,v 1.14 2003/03/02 20:49:10 deraadt Exp $ */
/*
* Copyright (c) 2002 Theo de Raadt. All rights reserved.
@@ -132,8 +132,10 @@ parse_configline(char *line)
name = line;
- for (cp = name; *cp != ';'; cp++)
+ for (cp = name; *cp && *cp != ';'; cp++)
;
+ if (*cp != ';')
+ goto parse_error;
*cp++ = '\0';
msg = cp;
if (*cp++ != '"')