diff --git a/CHANGES b/CHANGES index 8a1786a..2a95b7f 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,7 @@ Changelog for hydra Release 8.7-dev * New web page: https://github.com/vanhauser-thc/thc-hydra +* ldap: fixed a dumb strlen on a potential null pointer * http-get/http-post: - now supports H=/h= parameters same as http-form (thanks to mathewmarcus@github for the patch) - 403/404 errors are now always registered as failed attempts diff --git a/hydra-ldap.c b/hydra-ldap.c index ff90d2e..e00265e 100644 --- a/hydra-ldap.c +++ b/hydra-ldap.c @@ -451,7 +451,7 @@ int32_t service_ldap_init(char *ip, int32_t sp, unsigned char options, char *mis // return codes: // 0 all OK // -1 error, hydra will exit, so print a good error message here - if (strlen(miscptr) > 220) { + if (miscptr != NULL && strlen(miscptr) > 220) { fprintf(stderr, "[ERROR] the option string to this module may not be larger than 220 bytes\n"); return -1; }