sysvinit-2.88-wall-maxlines.patch 295 B

1234567891011121314
  1. diff --git a/src/wall.c b/src/wall.c
  2. index 92ffbc1..9c68338 100644
  3. --- a/src/wall.c
  4. +++ b/src/wall.c
  5. @@ -94,7 +94,7 @@ int main(int argc, char **argv)
  6. i = 0;
  7. for (p = buf; *p; p++) {
  8. - if (*p == '\n' && i++ > MAXLINES) {
  9. + if (*p == '\n' && ++i >= MAXLINES) {
  10. *++p = 0;
  11. break;
  12. }