CVSROOT    : /cvsroot/undernet-ircu
Module     : ircu2.10
Branch tags: u2_10_11_05
Commit time: 2003-06-29 12:26:23 UTC

Modified files:
  Tag: u2_10_11_05
     ChangeLog ircd/IPcheck.c

Log message:

Author: hikari <[EMAIL PROTECTED]>
Log message:

  Prevent overflow in ip_registry_connect_fail().

---------------------- diff included ----------------------
Index: ircu2.10/ChangeLog
diff -u ircu2.10/ChangeLog:1.290.2.128.2.24 ircu2.10/ChangeLog:1.290.2.128.2.25
--- ircu2.10/ChangeLog:1.290.2.128.2.24 Fri Jun 27 03:51:12 2003
+++ ircu2.10/ChangeLog  Sun Jun 29 05:26:13 2003
@@ -1,3 +1,7 @@
+2003-06-29 hikari <[EMAIL PROTECTED]>
+       * ircd/IPcheck.c: Fixed overflow problem in
+       ip_registry_connect_fail()
+
 2003-06-27 hikari <[EMAIL PROTECTED]>
        * ircd/ircd.c: After thought, update the next check time based on
        when an unregistered client should expire.
Index: ircu2.10/ircd/IPcheck.c
diff -u ircu2.10/ircd/IPcheck.c:1.26.2.2.4.2 ircu2.10/ircd/IPcheck.c:1.26.2.2.4.3
--- ircu2.10/ircd/IPcheck.c:1.26.2.2.4.2        Mon May  5 23:43:45 2003
+++ ircu2.10/ircd/IPcheck.c     Sun Jun 29 05:26:13 2003
@@ -16,7 +16,7 @@
  * along with this program; if not, write to the Free Software
  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  *
- * $Id: IPcheck.c,v 1.26.2.2.4.2 2003/05/06 06:43:45 shad0w Exp $
+ * $Id: IPcheck.c,v 1.26.2.2.4.3 2003/06/29 12:26:13 shad0w Exp $
  *
  * 
  * This file should be edited in a window with a width of 141 characters
@@ -337,8 +337,8 @@
 {
   struct IPRegistryEntry* entry = ip_registry_find(addr);
   if (entry) {
-    assert(entry->attempts);
-    --entry->attempts;
+    if (0 == --entry->attempts)
+      ++entry->attempts; /* check for overflow */
   }
 }
 
----------------------- End of diff -----------------------

Reply via email to