mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
659 B

  1. --- ./src/ps.c.sec2 2006-11-09 17:31:34.000000000 +0000
  2. +++ ./src/ps.c 2006-11-09 17:37:07.000000000 +0000
  3. @@ -1423,6 +1423,8 @@
  4. quoted=1;
  5. line++;
  6. while (*line && !(*line == ')' && level == 0 )) {
  7. + if (cp - text >= PSLINELENGTH - 2)
  8. + break;
  9. if (*line == '\\') {
  10. if (*(line+1) == 'n') {
  11. *cp++ = '\n';
  12. @@ -1477,8 +1479,11 @@
  13. }
  14. }
  15. } else {
  16. - while (*line && !(*line == ' ' || *line == '\t' || *line == '\n'))
  17. + while (*line && !(*line == ' ' || *line == '\t' || *line == '\n')) {
  18. + if (cp - text >= PSLINELENGTH - 2)
  19. + break;
  20. *cp++ = *line++;
  21. + }
  22. }
  23. *cp = '\0';
  24. if (next_char) *next_char = line;