Merge pull request #1021 from lhywk/fix/null-check-start_redis
Some checks failed
release / Build the docker image (push) Has been cancelled

Fix Add NULL check to prevent NULL pointer dereference in start_redis( )
This commit is contained in:
van Hauser 2025-07-03 09:56:21 +02:00 committed by GitHub
commit 96b42617d7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -24,6 +24,11 @@ int32_t start_redis(int32_t s, char *ip, int32_t port, unsigned char options, ch
return 1;
}
buf = hydra_receive_line(s);
if (buf == NULL) {
hydra_report(stderr, "[ERROR] Failed to receive response from Redis server.\n");
return 3;
}
if (buf[0] == '+') {
hydra_report_found_host(port, ip, "redis", fp);
hydra_completed_pair_found();