]> granicus.if.org Git - shadow/commitdiff
* contrib/adduser-old.c, contrib/adduser.c: Do not use the target
authornekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 7 Mar 2009 16:32:11 +0000 (16:32 +0000)
committernekral-guest <nekral-guest@5a98b0ae-9ef6-0310-add3-de5d479b70d7>
Sat, 7 Mar 2009 16:32:11 +0000 (16:32 +0000)
of snprintf in one of the format's parameters.

ChangeLog
contrib/adduser-old.c
contrib/adduser.c

index 266fa29a586df6151d706fa09f23f179e4b6a81e..566937ca7e8b214b73814fc6d123bdc72a12a6c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index f924b36e4b41c7fece63903eca0e285a6ee18e8b..0b2080ec698cd7eae5da40ffc05a53b9cb4c0e21 100644 (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);
index 72ed94b75e5093726c8a9b26557fb050d14ea203..88596b02fd0b93fb7a4cdf32b527cfa422a1a14a 100644 (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
        {