]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/channel.c
- replaced a lot of strcat() calls with strlcat() which is more secure.
[ngircd-alex.git] / src / ngircd / channel.c
index c50398940a3c2c827267cc4abf8c42dc2d000631..971fe2f9c4cd28830c4bcdde0015865fff8907c1 100644 (file)
@@ -17,7 +17,7 @@
 
 #include "portab.h"
 
 
 #include "portab.h"
 
-static char UNUSED id[] = "$Id: channel.c,v 1.40 2002/12/26 16:25:43 alex Exp $";
+static char UNUSED id[] = "$Id: channel.c,v 1.41 2002/12/26 16:48:14 alex Exp $";
 
 #include "imp.h"
 #include <assert.h>
 
 #include "imp.h"
 #include <assert.h>
@@ -494,7 +494,7 @@ Channel_ModeAdd( CHANNEL *Chan, CHAR Mode )
        if( ! strchr( Chan->modes, x[0] ))
        {
                /* Client hat den Mode noch nicht -> setzen */
        if( ! strchr( Chan->modes, x[0] ))
        {
                /* Client hat den Mode noch nicht -> setzen */
-               strcat( Chan->modes, x );
+               strlcat( Chan->modes, x, sizeof( Chan->modes ));
                return TRUE;
        }
        else return FALSE;
                return TRUE;
        }
        else return FALSE;
@@ -547,7 +547,7 @@ Channel_UserModeAdd( CHANNEL *Chan, CLIENT *Client, CHAR Mode )
        if( ! strchr( cl2chan->modes, x[0] ))
        {
                /* Client hat den Mode noch nicht -> setzen */
        if( ! strchr( cl2chan->modes, x[0] ))
        {
                /* Client hat den Mode noch nicht -> setzen */
-               strcat( cl2chan->modes, x );
+               strlcat( cl2chan->modes, x, sizeof( cl2chan->modes ));
                return TRUE;
        }
        else return FALSE;
                return TRUE;
        }
        else return FALSE;