Avoid using exiting allocators in the front end.

This commit is contained in:
Todd C. Miller
2015-06-17 17:00:54 -06:00
parent 5ce50a885c
commit cb63ca701c
19 changed files with 422 additions and 259 deletions

View File

@@ -80,7 +80,8 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
pass = tgetpass(msg->msg, msg->timeout, flags);
if (pass == NULL)
goto err;
repl->reply = sudo_estrdup(pass);
if ((repl->reply = strdup(pass)) == NULL)
sudo_fatalx_nodebug(U_("unable to allocate memory"));
memset_s(pass, SUDO_CONV_REPL_MAX, 0, strlen(pass));
break;
case SUDO_CONV_INFO_MSG: