fputs() is now specified as returning non-negative on success, not

explicitly zero.  Fixes a failure on glibc.
This commit is contained in:
Todd C. Miller
2016-05-25 14:50:05 -06:00
parent e93b4aa681
commit 53ebf69af3

View File

@@ -78,11 +78,11 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
memset_s(pass, SUDO_CONV_REPL_MAX, 0, strlen(pass));
break;
case SUDO_CONV_INFO_MSG:
if (msg->msg != NULL && fputs(msg->msg, stdout) != 0)
if (msg->msg != NULL && fputs(msg->msg, stdout) == EOF)
goto err;
break;
case SUDO_CONV_ERROR_MSG:
if (msg->msg != NULL && fputs(msg->msg, stderr) != 0)
if (msg->msg != NULL && fputs(msg->msg, stderr) == EOF)
goto err;
break;
default: