Commit 0df19c2c authored by Per Cederqvist's avatar Per Cederqvist

(prot_a_get_token): Disconnect the client if it attempts to send a

token (other than a string) that is longer than 1000 characters.
parent 0fc6145d
/*
* $Id: prot-a-parse.c,v 0.28 1996/08/03 01:31:45 ceder Exp $
* $Id: prot-a-parse.c,v 0.29 1996/08/25 19:56:37 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* BUG: Not all functions are used, I think. /ceder
*/
static char *rcsid = "$Id: prot-a-parse.c,v 0.28 1996/08/03 01:31:45 ceder Exp $";
static char *rcsid = "$Id: prot-a-parse.c,v 0.29 1996/08/25 19:56:37 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -83,6 +83,12 @@ prot_a_get_token(Connection *client)
if ( client->first_to_parse >= s_strlen(client->unparsed) )
{
if (client->first_to_parse - old_first > 1000)
{
mux_printf(client, "%%%%Insane token length.\n");
mux_flush(client);
longjmp(parse_env, ISC_LOGOUT);
}
client->first_to_parse = old_first;
longjmp(parse_env, ISC_MSG_INCOMPLETE);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment