From 485094b0c9cc99e64d09270763d6d598a1163206 Mon Sep 17 00:00:00 2001 From: Gilles Chehade Date: Mon, 30 Nov 2015 12:57:06 +0000 Subject: replace a fatalx() with a graceful failure --- usr.sbin/smtpd/lka_session.c | 8 +++++--- 1 file 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 @@ -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; -- cgit v1.2.3