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.

freetype-2.3.11-CVE-2010-2498.patch 1.6KB

1234567891011121314151617181920212223242526272829303132333435
  1. --- freetype-2.3.11/src/pshinter/pshalgo.c 2009-07-03 15:28:24.000000000 +0200
  2. +++ freetype-2.3.11/src/pshinter/pshalgo.c 2010-07-13 13:14:22.000000000 +0200
  3. @@ -4,7 +4,8 @@
  4. /* */
  5. /* PostScript hinting algorithm (body). */
  6. /* */
  7. -/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 by */
  8. +/* Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 */
  9. +/* by */
  10. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  11. /* */
  12. /* This file is part of the FreeType project, and may only be used */
  13. @@ -1690,7 +1691,10 @@
  14. /* process secondary hints to `selected' points */
  15. if ( num_masks > 1 && glyph->num_points > 0 )
  16. {
  17. - first = mask->end_point;
  18. + /* the `endchar' op can reduce the number of points */
  19. + first = mask->end_point > glyph->num_points
  20. + ? glyph->num_points
  21. + : mask->end_point;
  22. mask++;
  23. for ( ; num_masks > 1; num_masks--, mask++ )
  24. {
  25. @@ -1698,7 +1702,9 @@
  26. FT_Int count;
  27. - next = mask->end_point;
  28. + next = mask->end_point > glyph->num_points
  29. + ? glyph->num_points
  30. + : mask->end_point;
  31. count = next - first;
  32. if ( count > 0 )
  33. {