summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGilles Chehade <gilles@cvs.openbsd.org>2015-11-30 12:57:06 +0000
committerGilles Chehade <gilles@cvs.openbsd.org>2015-11-30 12:57:06 +0000
commit485094b0c9cc99e64d09270763d6d598a1163206 (patch)
treefa1e880095447bcc45b8d020919bae0f382bd9fe
parent7ceeb3900552ad916ac57036734190c896158c96 (diff)
replace a fatalx() with a graceful failure
-rw-r--r--usr.sbin/smtpd/lka_session.c8
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;