* contrib/adduser-old.c, contrib/adduser.c: Do not use the target

of snprintf in one of the format's parameters.
This commit is contained in:
nekral-guest 2009-03-07 16:32:11 +00:00
parent 7368452e49
commit f47d9eba94
3 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2009-03-07 Nicolas François <nicolas.francois@centraliens.net>
* contrib/adduser-old.c, contrib/adduser.c: Do not use the target
of snprintf in one of the format's parameters.
2009-03-07 Nicolas François <nicolas.francois@centraliens.net>
* man/groupmems.8.xml: groupmems does not create new user.

View File

@ -230,7 +230,7 @@ void main()
fflush(stdin);
} else
if (dir[strlen(dir)-1]=='/')
sprintf(dir,"%s%s",dir,uname);
sprintf(dir+strlen(dir),"%s",uname);
printf("\nShell [%s]: ",DEFAULT_SHELL);
fflush(stdout);

View File

@ -296,7 +296,7 @@ main (void)
sprintf (dir, "%s/%s", DEFAULT_HOME, usrname);
}
else if (dir[strlen (dir) - 1] == '/')
sprintf (dir, "%s%s", dir, usrname);
sprintf (dir+strlen(dir), "%s", usrname);
}
else
{