CVSROOT : /cvsroot/undernet-ircu
Module : ircu2.10
Branch tags: u2_10_11_05
Commit time: 2003-10-25 15:19:00 UTC
Modified files:
Tag: u2_10_11_05
ChangeLog include/patchlevel.h ircd/m_whois.c
Log message:
Author: beware <[EMAIL PROTECTED]> via hikari <[EMAIL PROTECTED]>
Log message:
Fixed /whois comma separated list with wildcards CPU hog bug.
---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.128.2.40 ircu2.10/ChangeLog:1.290.2.128.2.41
--- ircu2.10/ChangeLog:1.290.2.128.2.40 Fri Oct 24 21:42:46 2003
+++ ircu2.10/ChangeLog Sat Oct 25 08:18:50 2003
@@ -1,3 +1,7 @@
+2003-10-25 beware <[EMAIL PROTECTED]>
+ * ircd/m_who.c: Fixed /whois comma separated list with wildcards cpu
+ hog bug
+
2003-10-25 Isomer <[EMAIL PROTECTED]>
* ircd/gline.c: When comparing hosts for equality, check that
one isn't NULL.
Index: ircu2.10/include/patchlevel.h
diff -u ircu2.10/include/patchlevel.h:1.10.4.63.2.4
ircu2.10/include/patchlevel.h:1.10.4.63.2.5
--- ircu2.10/include/patchlevel.h:1.10.4.63.2.4 Fri Oct 24 20:27:08 2003
+++ ircu2.10/include/patchlevel.h Sat Oct 25 08:18:50 2003
@@ -15,10 +15,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: patchlevel.h,v 1.10.4.63.2.4 2003/10/25 03:27:08 isomer Exp $
+ * $Id: patchlevel.h,v 1.10.4.63.2.5 2003/10/25 15:18:50 shad0w Exp $
*
*/
-#define PATCHLEVEL "05pre5.(part)"
+#define PATCHLEVEL "05pre5.(part).(whois)"
#define RELEASE ".11."
Index: ircu2.10/ircd/m_whois.c
diff -u ircu2.10/ircd/m_whois.c:1.19.2.10 ircu2.10/ircd/m_whois.c:1.19.2.10.2.1
--- ircu2.10/ircd/m_whois.c:1.19.2.10 Tue Jan 7 03:15:44 2003
+++ ircu2.10/ircd/m_whois.c Sat Oct 25 08:18:50 2003
@@ -20,7 +20,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
- * $Id: m_whois.c,v 1.19.2.10 2003/01/07 11:15:44 isomer Exp $
+ * $Id: m_whois.c,v 1.19.2.10.2.1 2003/10/25 15:18:50 shad0w Exp $
*/
/*
@@ -349,6 +349,8 @@
char* p = 0;
int found = 0;
int total = 0;
+ int wildscount = 0;
+
if (parc < 2)
{
@@ -401,8 +403,15 @@
found = 1;
}
}
- else /* wilds */
- found=do_wilds(sptr, nick, total, parc);
+ else {
+ /* wilds */
+ wildscount++;
+ if (wildscount > 3) {
+ send_reply(sptr, ERR_QUERYTOOLONG, parv[1]);
+ break;
+ }
+ found=do_wilds(sptr, nick, total, parc);
+ }
if (!found)
send_reply(sptr, ERR_NOSUCHNICK, nick);
----------------------- End of diff -----------------------