Commit 583b42bb authored by Per Cederqvist's avatar Per Cederqvist
Browse files

(local_to_global): Check that the no_of_texts argument isn't larger

than 255.
parent 669721af
/*
* $Id: text.c,v 0.53 1998/08/07 23:17:27 ceder Exp $
* $Id: text.c,v 0.54 1998/08/09 07:18:13 ceder Exp $
* Copyright (C) 1991, 1992, 1993, 1994, 1995, 1996 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -29,7 +29,7 @@
*/
static const char *
rcsid = "$Id: text.c,v 0.53 1998/08/07 23:17:27 ceder Exp $";
rcsid = "$Id: text.c,v 0.54 1998/08/09 07:18:13 ceder Exp $";
#include "rcs.h"
USE(rcsid);
......@@ -3041,8 +3041,8 @@ get_map(Conf_no conf_no,
}
extern Success
local_to_global(Conf_no conf_no,
Local_text_no first_local_no,
local_to_global(Conf_no conf_no,
Local_text_no first_local_no,
unsigned long no_of_texts,
Text_mapping *result)
{
......@@ -3057,6 +3057,13 @@ local_to_global(Conf_no conf_no,
return FAILURE;
}
if (no_of_texts > 255)
{
err_stat = 255;
kom_errno = KOM_LONG_ARRAY;
return FAILURE;
}
CHK_LOGIN(FAILURE);
GET_C_STAT(conf_c, conf_no, FAILURE);
......
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