From eae8bc9d56542c87a546eb2ee1e536ff643d42eb Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Sat, 16 Jul 2016 20:59:59 -0600 Subject: [PATCH] Fix typo introduced in last commit to fix fill_args() overflow check. --- plugins/sudoers/toke_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; } -- 2.40.0