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-2012-1134.patch 1.3KB

1234567891011121314151617181920212223242526
  1. --- freetype-2.3.11/src/type1/t1parse.c 2009-07-03 15:28:24.000000000 +0200
  2. +++ freetype-2.3.11/src/type1/t1parse.c 2012-03-28 10:39:25.000000000 +0200
  3. @@ -4,7 +4,7 @@
  4. /* */
  5. /* Type 1 parser (body). */
  6. /* */
  7. -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2008, 2009 by */
  8. +/* Copyright 1996-2005, 2008, 2009, 2012 by */
  9. /* David Turner, Robert Wilhelm, and Werner Lemberg. */
  10. /* */
  11. /* This file is part of the FreeType project, and may only be used, */
  12. @@ -464,6 +464,14 @@
  13. /* we now decrypt the encoded binary private dictionary */
  14. psaux->t1_decrypt( parser->private_dict, parser->private_len, 55665U );
  15. + if ( parser->private_len < 4 )
  16. + {
  17. + FT_ERROR(( "T1_Get_Private_Dict:"
  18. + " invalid private dictionary section\n" ));
  19. + error = T1_Err_Invalid_File_Format;
  20. + goto Fail;
  21. + }
  22. +
  23. /* replace the four random bytes at the beginning with whitespace */
  24. parser->private_dict[0] = ' ';
  25. parser->private_dict[1] = ' ';