mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-07-06 04:51:40 -07:00
Add length check for fixed-size string
This commit is contained in:
parent
b589d658bd
commit
f2d2cd338e
1 changed files with 1 additions and 1 deletions
|
@ -111,7 +111,7 @@ void password_to_key_md5(u_char * password, /* IN */
|
||||||
|
|
||||||
if (mylen < 8) {
|
if (mylen < 8) {
|
||||||
memset(bpass, 0, sizeof(bpass));
|
memset(bpass, 0, sizeof(bpass));
|
||||||
strcpy(bpass, password);
|
strncpy(bpass, password, sizeof(bpass) - 1);
|
||||||
while (mylen < 8) {
|
while (mylen < 8) {
|
||||||
strcat(bpass, password);
|
strcat(bpass, password);
|
||||||
mylen += passwordlen;
|
mylen += passwordlen;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue