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

123456789101112131415161718192021222324252627282930313233343536
  1. --- t1lib-5.1.2.fix/lib/type1/type1.c 2007-12-23 21:19:42.000000000 +0530
  2. +++ t1lib-5.1.2.fix/lib/type1/type1.c 2012-01-03 11:54:52.257808202 +0530
  3. @@ -1289,7 +1289,7 @@
  4. static int DoRead(CodeP)
  5. int *CodeP;
  6. {
  7. - if (strindex >= CharStringP->len) return(FALSE); /* end of string */
  8. + if (!CharStringP || strindex >= CharStringP->len) return(FALSE); /* end of string */
  9. /* We handle the non-documented Adobe convention to use lenIV=-1 to
  10. suppress charstring encryption. */
  11. if (blues->lenIV==-1) {
  12. @@ -1700,6 +1700,7 @@
  13. long pindex = 0;
  14. /* compute hinting for previous segment! */
  15. + if (ppoints == NULL) Error0i("RLineTo: No previous point!\n");
  16. FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx, dy);
  17. /* Allocate a new path point and pre-setup data */
  18. @@ -1728,6 +1729,7 @@
  19. long pindex = 0;
  20. /* compute hinting for previous point! */
  21. + if (ppoints == NULL) Error0i("RRCurveTo: No previous point!\n");
  22. FindStems( currx, curry, currx-ppoints[numppoints-2].x, curry-ppoints[numppoints-2].y, dx1, dy1);
  23. /* Allocate three new path points and pre-setup data */
  24. @@ -1903,6 +1905,7 @@
  25. FindStems( currx, curry, 0, 0, dx, dy);
  26. }
  27. else {
  28. + if (ppoints == NULL) Error0i("RMoveTo: No previous point!\n");
  29. FindStems( currx, curry, ppoints[numppoints-2].x, ppoints[numppoints-2].y, dx, dy);
  30. }