summaryrefslogtreecommitdiff
path: root/usr.sbin/smtpd
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2009-07-28 20:51:51 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2009-07-28 20:51:51 +0000
commit72295dbedd1af93b332f58095676e3fa24e412ab (patch)
tree6af504968236429e1d9f599bd279ee8b90188526 /usr.sbin/smtpd
parentfb67b58e4d4baf34a4311f527a56c183d9117feb (diff)
slightly change how makemap parses its lines so that we consider #
as a comment only when it starts a line or is preceded by whitespaces. fixes a bug that was reported to me twice and which i ran into, ok jacekm@
Diffstat (limited to 'usr.sbin/smtpd')
-rw-r--r--usr.sbin/smtpd/makemap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/makemap.c b/usr.sbin/smtpd/makemap.c
index bea29b68d2b..81bd15943ad 100644
--- a/usr.sbin/smtpd/makemap.c
+++ b/usr.sbin/smtpd/makemap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: makemap.c,v 1.18 2009/05/30 23:53:41 gilles Exp $ */
+/* $OpenBSD: makemap.c,v 1.19 2009/07/28 20:51:50 gilles Exp $ */
/*
* Copyright (c) 2008 Gilles Chehade <gilles@openbsd.org>
@@ -186,7 +186,7 @@ parse_map(char *filename)
char *line;
size_t len;
size_t lineno = 0;
- char delim[] = { '\\', '\\', '#' };
+ char delim[] = { '\\', 0, 0 };
fp = fopen(filename, "r");
if (fp == NULL) {
@@ -227,7 +227,7 @@ parse_entry(char *line, size_t len, size_t lineno)
keyp = line;
while (isspace(*keyp))
keyp++;
- if (*keyp == '\0')
+ if (*keyp == '\0' || *keyp == '#')
return 1;
valp = keyp;