From f94095879ad2e54b49d2d268908cea8f5c04f182 Mon Sep 17 00:00:00 2001 From: Karol Babioch Date: Thu, 17 May 2018 16:18:53 +0200 Subject: [PATCH] pam_yubico.c: Use snprintf() instead of sprintf() --- pam_yubico.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pam_yubico.c b/pam_yubico.c index 2162560..4360913 100644 --- a/pam_yubico.c +++ b/pam_yubico.c @@ -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 */