Commit c27a12c3 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

create_text() now checks that the text isn't bigger than MAX_TEXT.

parent 102d1b5c
Mon Oct 21 23:14:22 1991 Per Cederqvist (ceder at robin)
* text.c (create_text): Check that the length of the text is no
greater than TEXT_LEN.
Wed Sep 25 11:44:17 1991 Per Cederqvist (ceder at lysator)
* person.c (do_set_passwd, chk_passwd),
......
/*
* $Id: text.c,v 0.7 1991/09/23 18:15:43 ceder Exp $
* $Id: text.c,v 0.8 1991/10/21 22:29:33 ceder Exp $
* Copyright (C) 1991 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
......@@ -28,7 +28,7 @@
* All atomic calls that deals with texts.
*/
static char *rcsid = "$Id: text.c,v 0.7 1991/09/23 18:15:43 ceder Exp $";
static char *rcsid = "$Id: text.c,v 0.8 1991/10/21 22:29:33 ceder Exp $";
#include <time.h>
#include <stdlib.h>
......@@ -1655,6 +1655,14 @@ create_text(String message,
CHK_LOGIN(0);
/* Check the length of the text. */
if ( s_strlen (message) >= TEXT_LEN )
{
kom_errno = KOM_LONG_STR;
return 0;
}
/* Check all misc-items */
if ( create_text_check_misc(&no_of_misc, misc) != OK
......
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