OpenSDE Packages Database (without history before r20070)
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.

43 lines
1.4 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../gv/CVE-2006-5864.patch
  5. # Copyright (C) 2006 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. CVE-2006-5864 from submaster by daja77
  17. https://www.rocklinux.net/submaster/index.websplb?mode=patch&uid=2006112114050583380
  18. --- ./src/ps.c.sec2 2006-11-09 17:31:34.000000000 +0000
  19. +++ ./src/ps.c 2006-11-09 17:37:07.000000000 +0000
  20. @@ -1423,6 +1423,8 @@
  21. quoted=1;
  22. line++;
  23. while (*line && !(*line == ')' && level == 0 )) {
  24. + if (cp - text >= PSLINELENGTH - 2)
  25. + break;
  26. if (*line == '\\') {
  27. if (*(line+1) == 'n') {
  28. *cp++ = '\n';
  29. @@ -1477,8 +1479,11 @@
  30. }
  31. }
  32. } else {
  33. - while (*line && !(*line == ' ' || *line == '\t' || *line == '\n'))
  34. + while (*line && !(*line == ' ' || *line == '\t' || *line == '\n')) {
  35. + if (cp - text >= PSLINELENGTH - 2)
  36. + break;
  37. *cp++ = *line++;
  38. + }
  39. }
  40. *cp = '\0';
  41. if (next_char) *next_char = line;