[srvx-commits] CVS: services/src proto-p10.c,1.51,1.52
Brought to you by:
entrope
|
From: Entrope <en...@us...> - 2003-01-02 21:38:54
|
Update of /cvsroot/srvx/services/src
In directory sc8-pr-cvs1:/tmp/cvs-serv23502/src
Modified Files:
proto-p10.c
Log Message:
fix off-by-one error when growing privmsg and notice handler arrays
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -C2 -r1.51 -r1.52
*** proto-p10.c 29 Dec 2002 06:19:22 -0000 1.51
--- proto-p10.c 2 Jan 2003 21:38:49 -0000 1.52
***************
*** 1,4 ****
/* proto-p10.c - IRC protocol output
! * Copyright 2000-2002 srvx Development Team
*
* This program is free software; you can redistribute it and/or modify
--- 1,4 ----
/* proto-p10.c - IRC protocol output
! * Copyright 2000-2003 srvx Development Team
*
* This program is free software; you can redistribute it and/or modify
***************
*** 2273,2277 ****
{
unsigned int numeric = user->num_local;
! if (numeric > num_privmsg_funcs) {
int newnum = numeric + 8;
privmsg_funcs = realloc(privmsg_funcs, newnum*sizeof(privmsg_func_t));
--- 2273,2277 ----
{
unsigned int numeric = user->num_local;
! if (numeric >= num_privmsg_funcs) {
int newnum = numeric + 8;
privmsg_funcs = realloc(privmsg_funcs, newnum*sizeof(privmsg_func_t));
***************
*** 2289,2293 ****
{
unsigned int numeric = user->num_local;
! if (numeric > num_notice_funcs) {
int newnum = numeric + 8;
notice_funcs = realloc(notice_funcs, newnum*sizeof(privmsg_func_t));
--- 2289,2293 ----
{
unsigned int numeric = user->num_local;
! if (numeric >= num_notice_funcs) {
int newnum = numeric + 8;
notice_funcs = realloc(notice_funcs, newnum*sizeof(privmsg_func_t));
|