From 6d63ed8a92d19d3e89f019f3e190406e2f33fbd7 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Fri, 13 May 2016 14:48:00 -0600 Subject: [PATCH] printf() returns < 0 on error, not explicitly -1 --- plugins/sudoers/parse.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sudoers/parse.c b/plugins/sudoers/parse.c index 18155e44c..d79caac2f 100644 --- a/plugins/sudoers/parse.c +++ b/plugins/sudoers/parse.c @@ -774,7 +774,7 @@ sudo_file_display_cmnd(struct sudo_nss *nss, struct passwd *pw) if (match != NULL && !match->negated) { const int len = sudo_printf(SUDO_CONV_INFO_MSG, "%s%s%s\n", safe_cmnd, user_args ? " " : "", user_args ? user_args : ""); - rval = len == -1 ? -1 : 0; + rval = len < 0 ? -1 : 0; } done: debug_return_int(rval); -- 2.40.0