diff options
author | 2015-11-30 12:57:05 +0000 | |
---|---|---|
committer | 2015-11-30 12:57:05 +0000 | |
commit | 66581dcda910210eae0483436dce0ef45dc4d428 (patch) | |
tree | 156fe9b510d97faff22527a2a4dec53acc567ca1 | |
parent | update to.c to fix IPv6 address parsing in smtpd.conf, while at it allow (diff) | |
download | wireguard-openbsd-66581dcda910210eae0483436dce0ef45dc4d428.tar.xz wireguard-openbsd-66581dcda910210eae0483436dce0ef45dc4d428.zip |
replace a fatalx() with a graceful failure
-rw-r--r-- | usr.sbin/smtpd/lka_session.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/smtpd/lka_session.c b/usr.sbin/smtpd/lka_session.c index 9720b173bd7..f7ccb9bdeb6 100644 --- a/usr.sbin/smtpd/lka_session.c +++ b/usr.sbin/smtpd/lka_session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lka_session.c,v 1.76 2015/11/30 12:26:55 sunil Exp $ */ +/* $OpenBSD: lka_session.c,v 1.77 2015/11/30 12:57:05 gilles Exp $ */ /* * Copyright (c) 2011 Gilles Chehade <gilles@poolp.org> @@ -768,8 +768,10 @@ lka_expand_format(char *buf, size_t len, const struct envelope *ep, char token[MAXTOKENLEN]; size_t ret, tmpret; - if (len < sizeof tmpbuf) - fatalx("lka_expand_format: tmp buffer < rule buffer"); + if (len < sizeof tmpbuf) { + log_warnx("lka_expand_format: tmp buffer < rule buffer"); + return 0; + } memset(tmpbuf, 0, sizeof tmpbuf); pbuf = buf; |