mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 16:22:35 +01:00
[svn] - fix off-by-one memory overflow error.
This commit is contained in:
parent
a8086a7ca0
commit
c8ff7ca97f
3 changed files with 18 additions and 7 deletions
15
ChangeLog
15
ChangeLog
|
@ -1,3 +1,18 @@
|
|||
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.
|
||||
|
|
|
@ -1 +1 @@
|
|||
#define SERNO "20070204-3201"
|
||||
#define SERNO "20070204-3203"
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
* 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"
|
||||
|
@ -103,7 +103,7 @@ kq_update_events(fde_t * F, short filter, PF * handler)
|
|||
|
||||
EV_SET(kep, (uintptr_t) F->fd, filter, kep_flags, 0, 0, (void *) F);
|
||||
|
||||
if(kqoff == kqmax)
|
||||
if(++kqoff == kqmax)
|
||||
{
|
||||
int ret;
|
||||
|
||||
|
@ -116,10 +116,6 @@ kq_update_events(fde_t * F, short filter, PF * handler)
|
|||
}
|
||||
kqoff = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
kqoff++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue