diff --git a/src/server/session.c b/src/server/session.c index 2cf5a84a9f57a539ec41feb0c3f5bfdb3288fd3c..8e129398509fda55d03f7fc38d21ee037a8b7852 100644 --- a/src/server/session.c +++ b/src/server/session.c @@ -1,5 +1,5 @@ /* - * $Id: session.c,v 0.30 1996/07/24 23:57:42 ceder Exp $ + * $Id: session.c,v 0.31 1996/07/26 00:43:38 ceder Exp $ * Copyright (C) 1991, 1992, 1993, 1994 Lysator Academic Computer Association. * * This file is part of the LysKOM server. @@ -28,7 +28,7 @@ * Session control and miscellaneous. */ -static char *rcsid = "$Id: session.c,v 0.30 1996/07/24 23:57:42 ceder Exp $"; +static char *rcsid = "$Id: session.c,v 0.31 1996/07/26 00:43:38 ceder Exp $"; #include "rcs.h" USE(rcsid); @@ -766,9 +766,9 @@ accept_async(Number_list *num_list) * Check agains maliciously long arrays */ - if (num_list->length > ay_dummy_last) + if (num_list->data == NULL && num_list->length > 0) { - kom_errno = KOM_INDEX_OUT_OF_RANGE; + kom_errno = KOM_LONG_ARRAY; return FAILURE; } @@ -784,7 +784,8 @@ accept_async(Number_list *num_list) /* - * Enter the new accept list + * Enter the new accept list -- silently ignore requests for + * messages that this version of the server doesn't understand. */ for (i = 0; i < num_list->length; i++) @@ -801,6 +802,7 @@ accept_async(Number_list *num_list) extern Success query_async(Number_list *result) { + /* (This static buffer is mentioned in async.h). */ static long temp[ay_dummy_last]; int i;