]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Use snprintf() to print an integer.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 19 Dec 2010 12:14:49 +0000 (13:14 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sun, 19 Dec 2010 12:14:49 +0000 (13:14 +0100)
lib/auth_srp_passwd.c

index 561637714638d3ad7b8691b6ca14347810c13cfe..370f845243475c19e9ebe25d33a15ad92b6d51be 100644 (file)
@@ -210,7 +210,7 @@ pwd_read_conf (const char *pconf_file, SRP_PWD_ENTRY * entry, int idx)
   unsigned i, len;
   char indexstr[10];
 
-  sprintf (indexstr, "%d", idx);        /* Flawfinder: ignore */
+  snprintf (indexstr, sizeof(indexstr), "%u", (unsigned int)idx);
 
   fd = fopen (pconf_file, "r");
   if (fd == NULL)