more pre-8.0 fixes

This commit is contained in:
vanhauser-thc 2014-04-28 11:45:11 +02:00
parent ebbd664e07
commit 163a499bfe
18 changed files with 74 additions and 76 deletions

View file

@ -25,7 +25,8 @@ int start_cisco(int s, char *ip, int port, unsigned char options, char *miscptr,
}
sleep(1);
do {
buf = hydra_receive_line(s);
if ((buf = hydra_receive_line(s)) == NULL)
return 3;
if (buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) - 1] = 0;
if (buf[strlen(buf) - 1] == '\r')
@ -49,7 +50,9 @@ int start_cisco(int s, char *ip, int port, unsigned char options, char *miscptr,
return 1;
}
do {
buf = hydra_receive_line(s);
free(buf);
if ((buf = hydra_receive_line(s)) == NULL)
return 3;
if (buf[strlen(buf) - 1] == '\n')
buf[strlen(buf) - 1] = 0;
if (buf[strlen(buf) - 1] == '\r')