Update of /cvsroot/srvx/services/src
In directory usw-pr-cvs1:/tmp/cvs-serv10813/src
Modified Files:
proto-p10.c
Log Message:
Hopefully fix a possible buffer overrun in the burst parser that resulted in lots of unhelpful parse errors (also fixed, hopefully).
Index: proto-p10.c
===================================================================
RCS file: /cvsroot/srvx/services/src/proto-p10.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -r1.36 -r1.37
*** proto-p10.c 24 Sep 2002 19:20:15 -0000 1.36
--- proto-p10.c 16 Oct 2002 03:39:36 -0000 1.37
***************
*** 937,941 ****
char *members = "", *banlist = NULL;
const char *key = NULL, *modes = NULL;
! unsigned int limit = 0, next = 3;
struct chanNode *cNode;
struct userNode *un;
--- 937,941 ----
char *members = "", *banlist = NULL;
const char *key = NULL, *modes = NULL;
! unsigned int limit = 0, next = 3, res = 1;
struct chanNode *cNode;
struct userNode *un;
***************
*** 970,974 ****
/* Burst channel members in now. */
for (user = members, sep = *members, mode = 0; sep; user = end) {
! for (end = user + 3; (*end != ':') && (*end != ',') && *end; end++) ;
sep = *end++; end[-1] = 0;
if (sep == ':') {
--- 970,974 ----
/* Burst channel members in now. */
for (user = members, sep = *members, mode = 0; sep; user = end) {
! for (end = user + 3; isalnum(*end) || *end == '[' || *end == ']'; end++) ;
sep = *end++; end[-1] = 0;
if (sep == ':') {
***************
*** 980,988 ****
}
}
! if (!(un = GetUserN(user))) continue;
AddChannelUser(un, cNode)->modes = mode;
}
! return 1;
}
--- 980,991 ----
}
}
! if (!(un = GetUserN(user))) {
! res = 0;
! continue;
! }
AddChannelUser(un, cNode)->modes = mode;
}
! return res;
}
|