Use a consistent version of fuzz_conversation() with all fuzzers.
Also undo a change to fuzz_sudoers.c that snuck in to the last commit.
This commit is contained in:
@@ -37,6 +37,25 @@ static int
|
||||
fuzz_conversation(int num_msgs, const struct sudo_conv_message msgs[],
|
||||
struct sudo_conv_reply replies[], struct sudo_conv_callback *callback)
|
||||
{
|
||||
int n;
|
||||
|
||||
for (n = 0; n < num_msgs; n++) {
|
||||
const struct sudo_conv_message *msg = &msgs[n];
|
||||
|
||||
switch (msg->msg_type & 0xff) {
|
||||
case SUDO_CONV_PROMPT_ECHO_ON:
|
||||
case SUDO_CONV_PROMPT_MASK:
|
||||
case SUDO_CONV_PROMPT_ECHO_OFF:
|
||||
/* input not supported */
|
||||
return -1;
|
||||
case SUDO_CONV_ERROR_MSG:
|
||||
case SUDO_CONV_INFO_MSG:
|
||||
/* no output for fuzzers */
|
||||
break;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user