From 88c95bab744667219bec90c733b2b1b68ecc57de Mon Sep 17 00:00:00 2001 From: suzuki toshiya Date: Sat, 1 Aug 2009 00:30:13 +0900 Subject: [PATCH] otvalid: Count the table size on memory by ptrdiff_t. --- ChangeLog | 9 +++++++++ src/otvalid/otvgpos.c | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b6b59f9b0..b670781d6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2009-07-31 suzuki toshiya + + otvalid: Count the table size on memory by ptrdiff_t. + + * src/otvalid/otvgpos.c (otv_ValueRecord_validate): + Change the type of table size from FT_UInt to + FT_PtrDist because it is calculated by the memory + addresses. + 2009-07-31 suzuki toshiya otvalid: Prevent an overflow by GPOS/GSUB 32b-bit offset. diff --git a/src/otvalid/otvgpos.c b/src/otvalid/otvgpos.c index c8b42213c..49b46183a 100644 --- a/src/otvalid/otvgpos.c +++ b/src/otvalid/otvgpos.c @@ -209,7 +209,7 @@ { if ( format & 1 ) { - FT_UInt table_size; + FT_PtrDist table_size; OTV_OPTIONAL_TABLE( device );