1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-17 21:54:15 +01:00

pam_yubico.c: Use snprintf() instead of sprintf()

This commit is contained in:
Karol Babioch 2018-05-17 16:18:53 +02:00
parent 3339cd2864
commit f94095879a

View File

@ -308,7 +308,7 @@ authorize_user_token_ldap (struct cfg *cfg,
DBG ("Failed allocating %zu bytes", i);
goto done;
}
sprintf (find, "%s=%s,%s", cfg->user_attr, user, cfg->ldapdn);
snprintf (find, i, "%s=%s,%s", cfg->user_attr, user, cfg->ldapdn);
filter = NULL;
} else if (cfg->ldapdn) {
find = strdup(cfg->ldapdn); /* allow free later */