mirror of
https://github.com/vanhauser-thc/thc-hydra.git
synced 2025-08-19 13:01:00 -07:00
Add length check for fixed-size string
This commit is contained in:
parent
99205f0410
commit
f1e0df4080
1 changed files with 1 additions and 1 deletions
|
@ -1212,7 +1212,7 @@ int32_t start_smb(int32_t s, char *ip, int32_t port, unsigned char options, char
|
||||||
if (strlen(pass = hydra_get_next_password()) == 0)
|
if (strlen(pass = hydra_get_next_password()) == 0)
|
||||||
pass = empty;
|
pass = empty;
|
||||||
|
|
||||||
strcpy(ipaddr_str, hydra_address2string(ip));
|
strncpy(ipaddr_str, hydra_address2string(ip), sizeof(ipaddr_str) - 1);
|
||||||
|
|
||||||
SMBSessionRet = SMBSessionSetup(s, login, pass, miscptr);
|
SMBSessionRet = SMBSessionSetup(s, login, pass, miscptr);
|
||||||
if (SMBSessionRet == -1)
|
if (SMBSessionRet == -1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue