Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Per Cederqvist
lyskom-server-ceder-1616-generations-topgit
Commits
8ab33939
Commit
8ab33939
authored
May 09, 2000
by
David Byers
Browse files
Fixed crash that could occur when receiving long aux-item lists
parent
655ff22a
Changes
4
Hide whitespace changes
Inline
Side-by-side
ChangeLog
View file @
8ab33939
2000-05-09 David Byers <davby@ida.liu.se>
The server could crash when parsing over-long aux-item lists.
* src/server/connections.h: Added dummy_aux_item field.
* src/server/prot-a-parse.c (prot_a_parse_string):
(prot_a_parse_aux_item_list): Use dummy_aux_item in client
structure instead of an auto variable.
* src/server/connections.c (free_parsed): Clear
client->dummy_aux_item.
2000-04-28 Per Cederqvist <ceder@lysator.liu.se>
The data base was saved even when "Never save: true" was used.
...
...
src/server/connections.c
View file @
8ab33939
/*
* $Id: connections.c,v 0.6
7 1999/10/28 13:18:07
byers Exp $
* $Id: connections.c,v 0.6
8 2000/05/09 11:31:14
byers Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -36,7 +36,7 @@
#endif
static
const
char
*
rcsid
=
"$Id: connections.c,v 0.6
7 1999/10/28 13:18:07
byers Exp $"
;
rcsid
=
"$Id: connections.c,v 0.6
8 2000/05/09 11:31:14
byers Exp $"
;
#include
"rcs.h"
USE
(
rcsid
);
...
...
@@ -301,6 +301,7 @@ free_parsed(Connection *client)
client
->
misc_info_list
.
misc
=
0
;
client
->
misc_info_list
.
no_of_misc
=
0
;
s_clear
(
&
client
->
aux_item
.
data
);
s_clear
(
&
client
->
dummy_aux_item
.
data
);
sfree
(
client
->
c_local_text_no_p
);
client
->
c_local_text_no_p
=
NULL
;
client
->
parse_pos
=
0
;
...
...
src/server/connections.h
View file @
8ab33939
/*
* $Id: connections.h,v 0.4
4 1999/05/24 09:34:22 ced
er Exp $
* $Id: connections.h,v 0.4
5 2000/05/09 11:31:14 by
er
s
Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -23,7 +23,7 @@
* Please mail bug reports to bug-lyskom@lysator.liu.se.
*/
/*
* $Id: connections.h,v 0.4
4 1999/05/24 09:34:22 ced
er Exp $
* $Id: connections.h,v 0.4
5 2000/05/09 11:31:14 by
er
s
Exp $
*
* connections.h -- The top level of the communication packet.
*
...
...
@@ -100,6 +100,7 @@ typedef struct connection {
Misc_info_list
misc_info_list
;
Aux_item_list
aux_item_list
;
/* Freed by free_parsed() */
Aux_item
aux_item
;
/* Freed by free_parsed() */
Aux_item
dummy_aux_item
;
/* Freed by free_parsed() */
Local_text_no
*
c_local_text_no_p
;
/* Freead by free_parsed(). */
Priv_bits
priv_bits
;
Conf_type
conf_type
;
...
...
src/server/prot-a-parse.c
View file @
8ab33939
/*
* $Id: prot-a-parse.c,v 0.4
3 1999/06/24 12:58:47 ced
er Exp $
* $Id: prot-a-parse.c,v 0.4
4 2000/05/09 11:31:15 by
er
s
Exp $
* Copyright (C) 1991-1999 Lysator Academic Computer Association.
*
* This file is part of the LysKOM server.
...
...
@@ -34,7 +34,7 @@
#endif
static
const
char
*
rcsid
=
"$Id: prot-a-parse.c,v 0.4
3 1999/06/24 12:58:47 ced
er Exp $"
;
rcsid
=
"$Id: prot-a-parse.c,v 0.4
4 2000/05/09 11:31:15 by
er
s
Exp $"
;
#include
"rcs.h"
USE
(
rcsid
);
...
...
@@ -482,7 +482,6 @@ prot_a_parse_aux_item_list(Connection *client,
{
static
unsigned
long
err_cnt
=
0
;
int
i
;
Aux_item
dummy_aux_item
;
switch
(
client
->
array_parse_pos
)
{
...
...
@@ -534,8 +533,8 @@ prot_a_parse_aux_item_list(Connection *client,
}
else
{
prot_a_parse_aux_item
(
client
,
&
dummy_aux_item
);
clear_aux_item
(
&
dummy_aux_item
);
prot_a_parse_aux_item
(
client
,
&
client
->
dummy_aux_item
);
clear_aux_item
(
&
client
->
dummy_aux_item
);
}
client
->
array_parse_index
+=
1
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment