]> arthur.barton.de Git - ngircd.git/blobdiff - src/ngircd/irc-login.c
[LOGIN] irc_login, w CVSDATE defined, used strncpy with overlapping src/dest.
[ngircd.git] / src / ngircd / irc-login.c
index ccdbc8e3cfe408cad1c97a270b6a7c677abfb50f..7c83805231734f09724c3c0d01f903af990a425a 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: irc-login.c,v 1.52 2006/10/01 19:05:02 alex Exp $";
+static char UNUSED id[] = "$Id: irc-login.c,v 1.54.2.1 2008/02/05 11:48:37 fw Exp $";
 
 #include "imp.h"
 #include <assert.h>
@@ -123,7 +123,6 @@ IRC_PASS( CLIENT *Client, REQUEST *Req )
        /* Implementation, version and IRC+ flags */
        if (Req->argc >= 3) {
                char *impl, *ptr, *serverver, *flags;
-               int _unused_var;
 
                impl = Req->argv[2];
                ptr = strchr(impl, '|');
@@ -602,8 +601,8 @@ Hello_User( CLIENT *Client )
        /* Version and system type */
 #ifdef CVSDATE
        strlcpy( ver, CVSDATE, sizeof( ver ));
-       strncpy( ver + 4, ver + 5, 2 );
-       strncpy( ver + 6, ver + 8, 3 );
+       memmove( ver + 4, ver + 5, 2 );
+       memmove( ver + 6, ver + 8, 3 );
        snprintf( vertxt, sizeof( vertxt ), "%s(%s)", PACKAGE_VERSION, ver );
        if( ! IRC_WriteStrClient( Client, RPL_YOURHOST_MSG, Client_ID( Client ), Client_ID( Client_ThisServer( )), vertxt, TARGET_CPU, TARGET_VENDOR, TARGET_OS )) return false;
 #else
@@ -619,12 +618,7 @@ Hello_User( CLIENT *Client )
 
        /* Features supported by this server (005 numeric, ISUPPORT),
         * see <http://www.irc.org/tech_docs/005.html> for details. */
-       if (! IRC_WriteStrClient(Client, RPL_ISUPPORT1_MSG, Client_ID(Client),
-                       Conf_MaxJoins))
-               return DISCONNECTED;
-       if (! IRC_WriteStrClient(Client, RPL_ISUPPORT2_MSG, Client_ID(Client),
-                       CHANNEL_NAME_LEN-1, CLIENT_NICK_LEN-1, COMMAND_LEN-23,
-                       CLIENT_AWAY_LEN-1, COMMAND_LEN-113))
+       if (! IRC_Send_ISUPPORT(Client))
                return DISCONNECTED;
 
        Client_SetType( Client, CLIENT_USER );