Fixes from the gnuwin32 port. * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/. * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H. * src/psaux/psobjs.c (ps_table_add): Check `length'.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
diff --git a/ChangeLog b/ChangeLog
index f2214e7..fc3a166 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2008-11-24 Werner Lemberg <wl@gnu.org>
+
+ Fixes from the gnuwin32 port.
+
+ * src/base/ftlcdfil.c: s/EXPORT/EXPORT_DEF/.
+
+ * src/base/ftotval.c: Include FT_OPENTYPE_VALIDATE_H.
+
+ * src/psaux/psobjs.c (ps_table_add): Check `length'.
+
2008-11-15 Werner Lemberg <wl@gnu.org>
* src/truetype/ttinterp.c (tt_default_graphics_state): The default
diff --git a/src/base/ftlcdfil.c b/src/base/ftlcdfil.c
index 5f1fa0b..a9b2060 100644
--- a/src/base/ftlcdfil.c
+++ b/src/base/ftlcdfil.c
@@ -266,7 +266,7 @@
#endif /* USE_LEGACY */
- FT_EXPORT( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
{
@@ -335,7 +335,7 @@
#else /* !FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
- FT_EXPORT( FT_Error )
+ FT_EXPORT_DEF( FT_Error )
FT_Library_SetLcdFilter( FT_Library library,
FT_LcdFilter filter )
{
diff --git a/src/base/ftotval.c b/src/base/ftotval.c
index b6de6db..20ed686 100644
--- a/src/base/ftotval.c
+++ b/src/base/ftotval.c
@@ -4,7 +4,7 @@
/* */
/* FreeType API for validating OpenType tables (body). */
/* */
-/* Copyright 2004, 2006 by */
+/* Copyright 2004, 2006, 2008 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -18,6 +18,7 @@
#include <ft2build.h>
#include FT_INTERNAL_OBJECTS_H
#include FT_SERVICE_OPENTYPE_VALIDATE_H
+#include FT_OPENTYPE_VALIDATE_H
/* documentation is in ftotval.h */
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 34a17cc..6812ac7 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -175,6 +175,12 @@
return PSaux_Err_Invalid_Argument;
}
+ if ( length < 0 )
+ {
+ FT_ERROR(( "ps_table_add: invalid length\n" ));
+ return PSaux_Err_Invalid_Argument;
+ }
+
/* grow the base block if needed */
if ( table->cursor + length > table->capacity )
{