Check for replies pointer being NULL just in case.
This commit is contained in:
@@ -77,6 +77,8 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
|
|||||||
SET(flags, TGP_NOECHO_TRY);
|
SET(flags, TGP_NOECHO_TRY);
|
||||||
read_pass:
|
read_pass:
|
||||||
/* Read the password unless interrupted. */
|
/* Read the password unless interrupted. */
|
||||||
|
if (replies == NULL)
|
||||||
|
goto err;
|
||||||
pass = tgetpass(msg->msg, msg->timeout, flags, callback);
|
pass = tgetpass(msg->msg, msg->timeout, flags, callback);
|
||||||
if (pass == NULL)
|
if (pass == NULL)
|
||||||
goto err;
|
goto err;
|
||||||
@@ -130,7 +132,7 @@ sudo_conversation(int num_msgs, const struct sudo_conv_message msgs[],
|
|||||||
|
|
||||||
err:
|
err:
|
||||||
/* Zero and free allocated memory and return an error. */
|
/* Zero and free allocated memory and return an error. */
|
||||||
if (replies != 0) {
|
if (replies != NULL) {
|
||||||
do {
|
do {
|
||||||
struct sudo_conv_reply *repl = &replies[n];
|
struct sudo_conv_reply *repl = &replies[n];
|
||||||
if (repl->reply == NULL)
|
if (repl->reply == NULL)
|
||||||
|
Reference in New Issue
Block a user