diff options
author | Paul Fox <pgf@brightstareng.com> | 2005-07-19 21:19:20 +0000 |
---|---|---|
committer | Paul Fox <pgf@brightstareng.com> | 2005-07-19 21:19:20 +0000 |
commit | deac371690aee1d0461d7fa8e7bb2cc80eda74f7 (patch) | |
tree | 0e8f6db260ec0fb19fdb8a4d1255650a76daa3b3 | |
parent | 3f6f3174e9bd7671a97b88b90e50595a8c3c4231 (diff) | |
download | busybox-w32-deac371690aee1d0461d7fa8e7bb2cc80eda74f7.tar.gz busybox-w32-deac371690aee1d0461d7fa8e7bb2cc80eda74f7.tar.bz2 busybox-w32-deac371690aee1d0461d7fa8e7bb2cc80eda74f7.zip |
applying fix from:
0000088: inetd chargen stream does not generate the
characters as recommended in RFC 864
Chragen service is generating garbage characters.
-rw-r--r-- | networking/inetd.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/networking/inetd.c b/networking/inetd.c index a1fa29ce4..dcbfffa33 100644 --- a/networking/inetd.c +++ b/networking/inetd.c | |||
@@ -1092,10 +1092,10 @@ static void chargen_stream(int s, servtab_t *sep) | |||
1092 | text[LINESIZ + 1] = '\n'; | 1092 | text[LINESIZ + 1] = '\n'; |
1093 | for (rs = ring;;) { | 1093 | for (rs = ring;;) { |
1094 | if ((len = endring - rs) >= LINESIZ) | 1094 | if ((len = endring - rs) >= LINESIZ) |
1095 | memcpy(rs, text, LINESIZ); | 1095 | memcpy(text, rs, LINESIZ); |
1096 | else { | 1096 | else { |
1097 | memcpy(rs, text, len); | 1097 | memcpy(text, rs, len); |
1098 | memcpy(ring, text + len, LINESIZ - len); | 1098 | memcpy(text + len, ring, LINESIZ - len); |
1099 | } | 1099 | } |
1100 | if (++rs == endring) | 1100 | if (++rs == endring) |
1101 | rs = ring; | 1101 | rs = ring; |
@@ -1125,10 +1125,10 @@ static void chargen_dg(int s, servtab_t *sep) | |||
1125 | return; | 1125 | return; |
1126 | 1126 | ||
1127 | if ((len = endring - rs) >= LINESIZ) | 1127 | if ((len = endring - rs) >= LINESIZ) |
1128 | memcpy(rs, text, LINESIZ); | 1128 | memcpy(text, rs, LINESIZ); |
1129 | else { | 1129 | else { |
1130 | memcpy(rs, text, len); | 1130 | memcpy(text, rs, len); |
1131 | memcpy(ring, text + len, LINESIZ - len); | 1131 | memcpy(text + len, ring, LINESIZ - len); |
1132 | } | 1132 | } |
1133 | if (++rs == endring) | 1133 | if (++rs == endring) |
1134 | rs = ring; | 1134 | rs = ring; |