applying fix from:
0000088: inetd chargen stream does not generate the characters as recommended in RFC 864 Chragen service is generating garbage characters.
This commit is contained in:
parent
3f6f3174e9
commit
deac371690
@ -1092,10 +1092,10 @@ static void chargen_stream(int s, servtab_t *sep)
|
|||||||
text[LINESIZ + 1] = '\n';
|
text[LINESIZ + 1] = '\n';
|
||||||
for (rs = ring;;) {
|
for (rs = ring;;) {
|
||||||
if ((len = endring - rs) >= LINESIZ)
|
if ((len = endring - rs) >= LINESIZ)
|
||||||
memcpy(rs, text, LINESIZ);
|
memcpy(text, rs, LINESIZ);
|
||||||
else {
|
else {
|
||||||
memcpy(rs, text, len);
|
memcpy(text, rs, len);
|
||||||
memcpy(ring, text + len, LINESIZ - len);
|
memcpy(text + len, ring, LINESIZ - len);
|
||||||
}
|
}
|
||||||
if (++rs == endring)
|
if (++rs == endring)
|
||||||
rs = ring;
|
rs = ring;
|
||||||
@ -1125,10 +1125,10 @@ static void chargen_dg(int s, servtab_t *sep)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
if ((len = endring - rs) >= LINESIZ)
|
if ((len = endring - rs) >= LINESIZ)
|
||||||
memcpy(rs, text, LINESIZ);
|
memcpy(text, rs, LINESIZ);
|
||||||
else {
|
else {
|
||||||
memcpy(rs, text, len);
|
memcpy(text, rs, len);
|
||||||
memcpy(ring, text + len, LINESIZ - len);
|
memcpy(text + len, ring, LINESIZ - len);
|
||||||
}
|
}
|
||||||
if (++rs == endring)
|
if (++rs == endring)
|
||||||
rs = ring;
|
rs = ring;
|
||||||
|
Loading…
Reference in New Issue
Block a user