diff options
-rw-r--r-- | tools/mkpasswd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/mkpasswd.c b/tools/mkpasswd.c index 81eb95a..9c40dc6 100644 --- a/tools/mkpasswd.c +++ b/tools/mkpasswd.c @@ -254,7 +254,8 @@ make_ext_salt(int rounds) { static char salt[10]; - sprintf(salt, "_%s", int_to_base64(rounds)); + snprintf(salt, sizeof(salt), "_%s", int_to_base64(rounds)); + generate_random_salt(&salt[5], 4); salt[9] = '\0'; |