From 6a814f32b6f5a12b2709efe7eb472f82e8b082cc Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Mon, 10 Nov 2008 03:55:37 +0000 Subject: last character in line is at len - 1. ok gilles --- usr.sbin/smtpd/aliases.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr.sbin/smtpd') diff --git a/usr.sbin/smtpd/aliases.c b/usr.sbin/smtpd/aliases.c index f8f7755a8c4..c0b063b310a 100644 --- a/usr.sbin/smtpd/aliases.c +++ b/usr.sbin/smtpd/aliases.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aliases.c,v 1.3 2008/11/10 00:57:35 gilles Exp $ */ +/* $OpenBSD: aliases.c,v 1.4 2008/11/10 03:55:36 tedu Exp $ */ /* * Copyright (c) 2008 Gilles Chehade @@ -395,7 +395,7 @@ alias_is_address(struct alias *alias, char *line, size_t len) return 0; /* @ cannot start or end an address */ - if (domain == line || domain == line + len) + if (domain == line || domain == line + len - 1) return 0; /* scan pre @ for disallowed chars */ -- cgit v1.2.3