Commits

Anonymous committed 01f8f6d

[svn] - fix off-by-one memory overflow error.

Comments (0)

Files changed (3)

+jilles      2007/02/04 15:08:04 UTC	(20070204-3203)
+  Log:
+  Change handling of modularized umodes:
+  - keep the bitmask reserved forever to the letter, fixing
+    the problems when loading multiple umode modules,
+    unloading them and then loading them in a different order
+  - don't allow local users to change umodes which have
+    been unloaded and don't set them on new users via
+    default_umodes
+  
+
+  Changes:	Modified:
+  +24 -3	trunk/src/s_user.c (File Modified) 
+
+
 jilles      2007/02/04 01:59:38 UTC	(20070204-3201)
   Log:
   Move find_umode_slot() from libcharybdis/tools.c to src/s_user.c.
-#define SERNO "20070204-3201"
+#define SERNO "20070204-3203"

libcharybdis/kqueue.c

  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307
  *  USA
  *
- *  $Id: kqueue.c 398 2005-12-12 18:12:46Z nenolod $
+ *  $Id: kqueue.c 3205 2007-02-09 22:18:23Z nenolod $
  */
 
 #include "stdinc.h"
 
 		EV_SET(kep, (uintptr_t) F->fd, filter, kep_flags, 0, 0, (void *) F);
 
-		if(kqoff == kqmax)
+		if(++kqoff == kqmax)
 		{
 			int ret;
 
 			}
 			kqoff = 0;
 		}
-		else
-		{
-			kqoff++;
-		}
 	}
 }
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.