small context indicates no issues.
+2009-04-25 Nicolas François <nicolas.francois@centraliens.net>
+
+ * libmisc/loginprompt.c: Prefer snprintf to sprintf, even if a
+ small context indicates no issues.
+
2009-04-25 Nicolas François <nicolas.francois@centraliens.net>
* src/faillog.c: Remove function calls from within assert().
if (strchr (nvar, '=') != NULL) {
envp[envc] = nvar;
} else {
- envp[envc] = xmalloc (strlen (nvar) + 32);
- sprintf (envp[envc], "L%d=%s", count++, nvar);
+ size_t len = strlen (nvar) + 32;
+ envp[envc] = xmalloc (len);
+ snprintf (envp[envc], len, "L%d=%s", count++, nvar);
}
}
set_env (envc, envp);