diff options
author | Theo Buehler <tb@cvs.openbsd.org> | 2020-11-29 20:07:39 +0000 |
---|---|---|
committer | Theo Buehler <tb@cvs.openbsd.org> | 2020-11-29 20:07:39 +0000 |
commit | 4f6aad51caa8d959e443433a10864db45d1820c3 (patch) | |
tree | c5ceb0159b490f01bcd7572123f401304cc9fdbb | |
parent | 80e0d21d844f9e8a41701af21ae213f210ef0043 (diff) |
Sync bsnprintf() with ldapd/util.c r1.13
Pointed out by jmatthew and requested by florian.
-rw-r--r-- | usr.sbin/smtpd/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/smtpd/util.c b/usr.sbin/smtpd/util.c index fce97ee764e..91e93678f77 100644 --- a/usr.sbin/smtpd/util.c +++ b/usr.sbin/smtpd/util.c @@ -1,4 +1,4 @@ -/* $OpenBSD: util.c,v 1.151 2020/02/24 23:54:28 millert Exp $ */ +/* $OpenBSD: util.c,v 1.152 2020/11/29 20:07:38 tb Exp $ */ /* * Copyright (c) 2000,2001 Markus Friedl. All rights reserved. @@ -176,7 +176,7 @@ bsnprintf(char *str, size_t size, const char *format, ...) va_start(ap, format); ret = vsnprintf(str, size, format, ap); va_end(ap); - if (ret < 0 || ret >= (int)size) + if (ret < 0 || (size_t)ret >= size) return 0; return 1; |