-/* $OpenBSD: lka_session.c,v 1.70 2015/10/02 00:29:51 gilles Exp $ */
+/* $OpenBSD: lka_session.c,v 1.71 2015/10/06 06:44:47 gilles Exp $ */
/*
* Copyright (c) 2011 Gilles Chehade <gilles@poolp.org>
/* token -> expanded token */
if (! strcasecmp("sender", rtoken)) {
if (snprintf(tmp, sizeof tmp, "%s@%s",
- ep->sender.user, ep->sender.domain) <= 0)
+ ep->sender.user, ep->sender.domain) >= (int)sizeof tmp)
return 0;
string = tmp;
}
else if (! strcasecmp("dest", rtoken)) {
if (snprintf(tmp, sizeof tmp, "%s@%s",
- ep->dest.user, ep->dest.domain) <= 0)
+ ep->dest.user, ep->dest.domain) >= (int)sizeof tmp)
return 0;
string = tmp;
}
else if (! strcasecmp("rcpt", rtoken)) {
if (snprintf(tmp, sizeof tmp, "%s@%s",
- ep->rcpt.user, ep->rcpt.domain) <= 0)
+ ep->rcpt.user, ep->rcpt.domain) >= (int)sizeof tmp)
return 0;
string = tmp;
}