[OTS] Fix off-by-one in GSUB/GPOS parser

Use the number of cells in the sub-parser table for number of lookup type.

BUG=chromium:116524
TEST=ran test_{un,}malicious_fonts.sh
Review URL: http://codereview.chromium.org/9581044

git-svn-id: http://ots.googlecode.com/svn/trunk@83 a4e77c2c-9104-11de-800e-5b313e0d2bf3
diff --git a/src/gpos.cc b/src/gpos.cc
index 19701a7..4a12ddb 100644
--- a/src/gpos.cc
+++ b/src/gpos.cc
@@ -69,8 +69,10 @@
   {GPOS_TYPE_EXTENSION_POSITIONING, ParseExtensionPositioning}
 };
 
+// TODO(bashi): Port Chromium's arraysize macro and use it instead of sizeof().
 const ots::LookupSubtableParser kGposLookupSubtableParser = {
-  GPOS_TYPE_RESERVED, GPOS_TYPE_EXTENSION_POSITIONING, kGposTypeParsers
+  sizeof(kGposTypeParsers) / sizeof(kGposTypeParsers[0]),
+  GPOS_TYPE_EXTENSION_POSITIONING, kGposTypeParsers
 };
 
 // Shared Tables: ValueRecord, Anchor Table, and MarkArray