t1lib-5.1.2-cve-2011-0764.patch 1.2 KB

123456789101112131415161718192021222324252627282930313233
  1. Description: Don't lookup previous point if there isn't any
  2. Author: Marc Deslauriers <marc.deslauriers@canonical.com>
  3. Forwarded: no
  4. Index: t1lib-5.1.2/lib/type1/type1.c
  5. ===================================================================
  6. --- t1lib-5.1.2.orig/lib/type1/type1.c 2011-12-13 14:24:14.280965637 -0600
  7. +++ t1lib-5.1.2/lib/type1/type1.c 2011-12-13 14:25:25.893320747 -0600
  8. @@ -1700,6 +1700,7 @@
  9. long pindex = 0;
  10. /* compute hinting for previous segment! */
  11. + if (ppoints == NULL) Error0i("RLineTo: No previous point!\n");
  12. FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx, dy);
  13. /* Allocate a new path point and pre-setup data */
  14. @@ -1728,6 +1729,7 @@
  15. long pindex = 0;
  16. /* compute hinting for previous point! */
  17. + if (ppoints == NULL) Error0i("RRCurveTo: No previous point!\n");
  18. FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx1, dy1);
  19. /* Allocate three new path points and pre-setup data */
  20. @@ -1903,6 +1905,7 @@
  21. FindStems( currx, curry, 0, 0, dx, dy);
  22. }
  23. else {
  24. + if (ppoints == NULL) Error0i("RMoveTo: No previous point!\n");
  25. FindStems( currx, curry, ppoints[numppoints-2].x, ppoints[numppoints-2].y, dx, dy);
  26. }