* movemail.c (main): Do not use sprintf when its result might not fit
in 'int'. Instead, put the possibly-long file name into the output of pfatal_with_name.
This commit is contained in:
parent
9250f75825
commit
644a0faa36
2 changed files with 7 additions and 4 deletions
|
@ -325,11 +325,10 @@ main (int argc, char **argv)
|
|||
if (desc < 0)
|
||||
{
|
||||
int mkstemp_errno = errno;
|
||||
char *message = (char *) xmalloc (strlen (tempname) + 50);
|
||||
sprintf (message, "creating %s, which would become the lock file",
|
||||
tempname);
|
||||
error ("error while creating what would become the lock file",
|
||||
0, 0);
|
||||
errno = mkstemp_errno;
|
||||
pfatal_with_name (message);
|
||||
pfatal_with_name (tempname);
|
||||
}
|
||||
close (desc);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue