From: <tom...@us...> - 2003-10-12 00:42:47
|
Update of /cvsroot/qmailadmin/qmailadmin In directory sc8-pr-cvs1:/tmp/cvs-serv5983 Modified Files: user.c Log Message: strcat cleanup Index: user.c =================================================================== RCS file: /cvsroot/qmailadmin/qmailadmin/user.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- user.c 10 Oct 2003 16:36:24 -0000 1.2 +++ user.c 12 Oct 2003 00:42:43 -0000 1.3 @@ -419,10 +419,7 @@ } #endif - strcpy(email, ""); - strcat(email,Newu); - strcat(email,"@"); - strcat(email,Domain); + snprintf (email, 128, "%s@%s", Newu, Domain); GetValue(TmpCGI,Gecos, "gecos=", sizeof(Gecos)); if ( strlen( Gecos ) == 0 ) { @@ -585,8 +582,7 @@ if (!(cmd = malloc(len + 1))) { return (0); } else { - sprintf(cmd, "%s", tmpstr); - strcat(cmd, ""); + snprintf(cmd, len + 1, "%s", tmpstr); } break; |