This commit is contained in:
vanhauser-thc 2014-04-27 13:49:33 +02:00
parent 6a94f708e8
commit 9f75ddad8b
32 changed files with 208 additions and 129 deletions

View file

@ -63,7 +63,7 @@ char *hydra_mysql_receive_line(int socket) {
j = 1;
while (hydra_data_ready(socket) > 0 && j > 0) {
j = internal__hydra_recv(socket, buf, sizeof(buf));
if ((buff2 = realloc(buff, i + j)) == NULL) {
if (j > 65535 || i + j > 65535 || (buff2 = realloc(buff, i + j)) == NULL) {
free(buff);
return NULL;
} else
@ -183,6 +183,7 @@ int start_mysql(int sock, char *ip, int port, unsigned char options, char *miscp
if (verbose)
hydra_report(stderr, "[VERBOSE] using default db 'mysql'\n");
}
database[sizeof(database)] = 0;
/* read server greeting */
res = hydra_mysql_init(sock);