Skip to content
GitLab
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
b80cf90e
Commit
b80cf90e
authored
Aug 08, 1998
by
Per Cederqvist
Browse files
(prot_a_output_text_mapping): Fixed a bug that could cause much too
much data to be written.
parent
a7abf8db
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/server/prot-a-output.c
View file @
b80cf90e
/*
* $Id: prot-a-output.c,v 0.3
3
1998/08/0
7
2
3:08:48
ceder Exp $
* $Id: prot-a-output.c,v 0.3
4
1998/08/0
8
2
1:42:06
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: prot-a-output.c,v 0.3
3
1998/08/0
7
2
3:08:48
ceder Exp $"
;
rcsid
=
"$Id: prot-a-output.c,v 0.3
4
1998/08/0
8
2
1:42:06
ceder Exp $"
;
#include
"rcs.h"
USE
(
rcsid
);
...
...
@@ -930,6 +930,7 @@ prot_a_output_text_mapping(Connection *fp,
{
Local_text_no
lowest
;
Local_text_no
highest
;
Local_text_no
limit
;
Local_text_no
zeroes
=
0
;
Local_text_no
nonzeroes
=
0
;
L2g_iterator
iter
;
...
...
@@ -947,6 +948,8 @@ prot_a_output_text_mapping(Connection *fp,
highest
=
iter
.
lno
;
}
limit
=
highest
+
1
;
/* Emit the "later-texts-exists" flag. */
mux_printf
(
fp
,
" %c"
,
iter
.
search_ended
?
'0'
:
'1'
);
...
...
@@ -968,7 +971,7 @@ prot_a_output_text_mapping(Connection *fp,
mux_printf
(
fp
,
" 0 %lu {"
,
(
unsigned
long
)
nonzeroes
);
for
(
l2gi_searchsome
(
&
iter
,
map
->
l2g
,
map
->
first
,
0
);
for
(
l2gi_searchsome
(
&
iter
,
map
->
l2g
,
map
->
first
,
limit
);
!
iter
.
search_ended
;
l2gi_next
(
&
iter
))
{
...
...
@@ -985,7 +988,7 @@ prot_a_output_text_mapping(Connection *fp,
(
unsigned
long
)
lowest
,
(
unsigned
long
)(
zeroes
+
nonzeroes
));
highest
=
lowest
;
for
(
l2gi_searchsome
(
&
iter
,
map
->
l2g
,
map
->
first
,
0
);
for
(
l2gi_searchsome
(
&
iter
,
map
->
l2g
,
map
->
first
,
limit
);
!
iter
.
search_ended
;
l2gi_next
(
&
iter
))
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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