Ver código fonte

* Some array alignment

svn: 1219
Bryan Drewery 22 anos atrás
pai
commit
92c1306ddb
4 arquivos alterados com 6 adições e 6 exclusões
  1. 1 1
      src/chan.h
  2. 2 2
      src/debug.c
  3. 2 2
      src/mod/irc.mod/chan.c
  4. 1 1
      src/mod/server.mod/servmsg.c

+ 1 - 1
src/chan.h

@@ -192,7 +192,7 @@ struct chanset_t {
  */
   char topic[121];
   char added_by[NICKLEN];	/* who added the channel? */
-  char floodwho[FLOOD_CHAN_MAX][81];
+  char floodwho[FLOOD_CHAN_MAX][128];
   char deopd[NICKLEN];		/* last person deop'd (must change	*/
   char dname[81];               /* what the users know the channel as like !eggdev */
   char name[81];                /* what the servers know the channel as, like !ABCDEeggdev */

+ 2 - 2
src/debug.c

@@ -34,8 +34,8 @@ int		sdebug = 0;             /* enable debug output? */
 
 #ifdef DEBUG_CONTEXT
 /* Context storage for fatal crashes */
-char    cx_file[16][15]; 
-char    cx_note[16][21];
+char    cx_file[16][16];
+char    cx_note[16][16];
 int     cx_line[16] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 int     cx_ptr = 0;
 #endif /* DEBUG_CONTEXT */

+ 2 - 2
src/mod/irc.mod/chan.c

@@ -408,8 +408,8 @@ static int detect_chan_flood(char *floodnick, char *floodhost, char *from,
       return 0;
   }
   if (rfc_casecmp(chan->floodwho[which], p)) {	/* new */
-    strncpy(chan->floodwho[which], p, 81);
-    chan->floodwho[which][81] = 0;
+    strncpy(chan->floodwho[which], p, sizeof(chan->floodwho[which]));
+    chan->floodwho[which][sizeof(chan->floodwho[which])] = 0;
     chan->floodtime[which] = now;
     chan->floodnum[which] = 1;
     return 0;

+ 1 - 1
src/mod/server.mod/servmsg.c

@@ -321,7 +321,7 @@ void nuke_server(char *reason)
 char ctcp_reply[1024] = "";
 
 static int lastmsgs[FLOOD_GLOBAL_MAX];
-static char lastmsghost[FLOOD_GLOBAL_MAX][81];
+static char lastmsghost[FLOOD_GLOBAL_MAX][128];
 static time_t lastmsgtime[FLOOD_GLOBAL_MAX];
 
 /* Do on NICK, PRIVMSG, NOTICE and JOIN.