From a1d51290c6bae271321b4d6623c83318f994f206 Mon Sep 17 00:00:00 2001 From: Per Cederqvist <ceder@lysator.liu.se> Date: Mon, 21 Oct 2002 08:57:37 +0000 Subject: [PATCH] Don't crash if a client sends the length of an aux-item list and disconnects before sending the "{". Fixed similar code for other arrays. Fix testsuite. --- ChangeLog | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/ChangeLog b/ChangeLog index 5672e6d6a..e4cdc0aef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,23 @@ 2002-10-21 Per Cederqvist <ceder@ceder.dyndns.org> + Don't crash if a client sends the length of an aux-item list and + disconnects before sending the "{". Fixed similar code for other + arrays. + * src/server/prot-a-parse.c (prot_a_parse_num_list): Don't set + res->length until res->data is allocated. + (prot_a_parse_misc_info_list): Ditto. + (prot_a_parse_aux_item_list): Ditto. Without this fix, a client + can cause a crash by sending the length of the list, and + disconnect before sending the "{". + (prot_a_parse_string): Add an additional comment explaining why a + client_len field should be added (bug 162). + + Fix testsuite. + * src/server/testsuite/lyskomd.0/29.exp: Expect bug 836: + mark-text-as-read gives a protocol error response instead of the + error code long-array when an overly long array is sent to the + server. + "make clean; make check" failed. * src/server/Makefile.am: Added explicit dependencies so that "make clean; make check" no longer fails. -- GitLab