[srvx-commits] CVS: services/src chanserv.c,1.232.2.15,1.232.2.16
Brought to you by:
entrope
|
From: Zoot <zo...@us...> - 2002-12-15 08:24:49
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv26184/src
Modified Files:
Tag: rel-1_1-branch
chanserv.c
Log Message:
Fix a crash caused by corrupted channel names in the ChanServ database.
Index: chanserv.c
===================================================================
RCS file: /cvsroot/srvx/services/src/chanserv.c,v
retrieving revision 1.232.2.15
retrieving revision 1.232.2.16
diff -C2 -r1.232.2.15 -r1.232.2.16
*** chanserv.c 12 Dec 2002 01:56:22 -0000 1.232.2.15
--- chanserv.c 15 Dec 2002 08:24:46 -0000 1.232.2.16
***************
*** 7072,7075 ****
--- 7072,7080 ----
{
cNode = AddChannel(key, now, NULL, NULL, 0, chanserv->numeric, NULL);
+ if(!cNode)
+ {
+ log(CS_LOG, LOG_ERROR, "Read channel with invalid name; skipping.\n");
+ return 0;
+ }
AddChannelOp(1, &chanserv, cNode, chanserv, 0);
}
|