From: Todd C. Miller Date: Sun, 17 Jul 2016 02:59:59 +0000 (-0600) Subject: Fix typo introduced in last commit to fix fill_args() overflow check. X-Git-Tag: SUDO_1_8_18^2~122 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=eae8bc9d56542c87a546eb2ee1e536ff643d42eb;p=sudo Fix typo introduced in last commit to fix fill_args() overflow check. --- diff --git a/plugins/sudoers/toke_util.c b/plugins/sudoers/toke_util.c index 2c2273ea8..9b5382e03 100644 --- a/plugins/sudoers/toke_util.c +++ b/plugins/sudoers/toke_util.c @@ -154,7 +154,7 @@ fill_args(const char *s, size_t len, int addspace) if (addspace) *p++ = ' '; len = arg_size - (p - sudoerslval.command.args); - if (strlcpy(p, s, len) != len) { + if (strlcpy(p, s, len) >= len) { sudo_warnx(U_("internal error, %s overflow"), __func__); goto bad; }