vipw: use snprintf() rather than sprintf()

This commit is contained in:
Karel Zak 2021-07-27 13:30:14 +02:00
parent a6d7f918ac
commit 2605d88379
1 changed files with 1 additions and 1 deletions

View File

@ -142,7 +142,7 @@ static void pw_write(void)
{
char tmp[FILENAMELEN + 4];
sprintf(tmp, "%s%s", orig_file, ".OLD");
snprintf(tmp, sizeof(tmp), "%s%s", orig_file, ".OLD");
unlink(tmp);
if (link(orig_file, tmp))