mirror of
https://github.com/rfc1036/whois.git
synced 2026-08-01 07:20:13 +00:00
mkpasswd: ignore a 0-bytes salt parameter
This also prevents a segmentation fault when CRYPT_GENSALT_IMPLEMENTS_DEFAULT_PREFIX is used. Closes #81 from Github.
This commit is contained in:
parent
7a5c83e8c3
commit
4f1ddfa66e
@ -282,7 +282,7 @@ int main(int argc, char *argv[])
|
||||
else
|
||||
rounds_str[0] = '\0';
|
||||
|
||||
if (salt_arg) {
|
||||
if (salt_arg && salt_arg[0] != '\0') {
|
||||
unsigned int c = strlen(salt_arg);
|
||||
if (c < salt_minlen || c > salt_maxlen) {
|
||||
if (salt_minlen == salt_maxlen)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user