Simply initializes n before it is used

When SSL is enabled, n is assigned the size of the server's second EHLO
response (I think in bytes), which will usually be significantly higher
than the command passed. As such, no commands are executed and no responses
are checked, which - silently - defeats the desired checks and results in a
success value.
This commit is contained in:
Iustin Pop 2019-01-18 22:52:54 +01:00 committed by Jan Wagner
parent 5237395433
commit 8520c643dd

View file

@ -293,6 +293,7 @@ main (int argc, char **argv)
printf("%s", buffer);
}
n = 0;
while (n < ncommands) {
xasprintf (&cmd_str, "%s%s", commands[n], "\r\n");
my_send(cmd_str, strlen(cmd_str));