Commit Graph

819 Commits

Author SHA1 Message Date
Behdad Esfahbod
690b919461 Remove use of flexible arrays
Also remove wrong ASSERT_SIZE that would trigger only when not using
flexible arrays (which was the case on win32, but not with gcc).
2010-04-25 22:52:22 -04:00
Behdad Esfahbod
1cebfbb063 Cleanup hb_face_create_for_data() 2010-04-23 20:49:18 -04:00
Behdad Esfahbod
d6b3c83a90 Allow get_table() to return NULL 2010-04-23 19:59:53 -04:00
Behdad Esfahbod
ad3653751b Typo 2010-04-23 19:43:40 -04:00
Behdad Esfahbod
990443e5f2 Remove lock_instance() 2010-04-23 17:53:32 -04:00
Behdad Esfahbod
187454c595 Add different casts from pointer and ref to avoid bugs 2010-04-23 17:44:28 -04:00
Behdad Esfahbod
efb324a46f Remove GET_FOR_DATA macros
The major-version check is now handled by sanitize.  If major
doesn't match, we reject and fall back to the Null object.
2010-04-23 16:28:27 -04:00
Behdad Esfahbod
f1aaa2a436 Add TODO 2010-04-23 15:19:50 -04:00
Behdad Esfahbod
33d4d4325e Zero glyph metrics before calling user callback 2010-04-23 14:56:55 -04:00
Behdad Esfahbod
4206e9511a More warning fixes 2010-04-23 14:54:01 -04:00
Behdad Esfahbod
ef66ebeabc Remove unused parameter 2010-04-23 14:40:36 -04:00
Behdad Esfahbod
1d720192b1 Fix compile warnings (HB_GNUC_UNUSED) 2010-04-23 14:39:10 -04:00
Behdad Esfahbod
8dfdca599c No need to keep blob in sanitize context 2010-04-23 14:07:34 -04:00
Behdad Esfahbod
254933c397 When sanitizing, delay making writable
Before, as soon as we needed to make an edit, we tried to make the blob
writable inplace.  That grows code unnecessarily though.  We can simply
fail, make writable, then start again.  That's indeed what the fallback
was doing anyway.
2010-04-23 13:57:10 -04:00
Behdad Esfahbod
71e735e915 [blob] Fallback to copying if mprotect() fails 2010-04-23 13:48:06 -04:00
Behdad Esfahbod
1aa4666b91 Cleanup OpenTypeFontFile 2010-04-23 13:32:03 -04:00
Behdad Esfahbod
ae4190cafe Properly define separate structs for TTCHeader and TTCHeaderVersion1 2010-04-23 12:33:02 -04:00
Behdad Esfahbod
a065f471b3 Cleanup Extension lookups
Two things:

1. Allow nested Extension lookups.  The offset is always positive, so
it can't loop circularly.

2. Move the check for all Extension subtables having the same lookup
type to the correct place.  Before it wasn't really working.
2010-04-22 20:15:11 -04:00
Behdad Esfahbod
a0bb49c583 Add comment re bsearch effect on sanitize 2010-04-22 18:47:03 -04:00
Behdad Esfahbod
d632ec4000 Cosmetic 2010-04-22 18:42:05 -04:00
Behdad Esfahbod
a3263aa773 Convert the last set of cast macros to templates 2010-04-22 18:42:01 -04:00
Behdad Esfahbod
c38188a191 Remove unused macro 2010-04-22 16:52:09 -04:00
Behdad Esfahbod
3b2c2df41b Cleanup Extension sanitize() 2010-04-22 16:51:42 -04:00
Behdad Esfahbod
1856184b93 Fail sanitize on major version mismatch
We handle major-version differences via get_for_data(), so sanitize
should never see a major version mismatch.
2010-04-22 14:21:17 -04:00
Behdad Esfahbod
df3f505dcf More sanitize cleanup 2010-04-22 14:11:33 -04:00
Behdad Esfahbod
278a91f0cd Minor cleanup of sanitize
Done with an audit of all sanitize()
2010-04-22 13:59:39 -04:00
Behdad Esfahbod
9ac7dc73bc Check for (impossible) overflow 2010-04-22 13:50:22 -04:00
Behdad Esfahbod
9fc8684fd8 Cleanup ContextFormat3 sanitize 2010-04-22 13:37:58 -04:00
Behdad Esfahbod
e77302c61f Add comment 2010-04-22 13:34:00 -04:00
Behdad Esfahbod
7c469c3ca4 Minor 2010-04-22 13:26:21 -04:00
Behdad Esfahbod
dc228048a8 Remove integrity check in Tag sanitize
Serves no useful purpose.
2010-04-22 13:22:41 -04:00
Behdad Esfahbod
8015a8c762 Don't sanitize raw table data
That part is performed by individual table sanitize.
2010-04-22 13:21:12 -04:00
Behdad Esfahbod
c293581e96 Add coment 2010-04-22 11:20:28 -04:00
Behdad Esfahbod
1faa76c6e8 Remove unnecessary casts 2010-04-22 10:54:26 -04:00
Behdad Esfahbod
079dc40112 Avoid overflow in TableDirectory sanitize 2010-04-22 10:47:12 -04:00
Behdad Esfahbod
fb5904ec93 Make casts more explicit 2010-04-22 10:43:30 -04:00
Behdad Esfahbod
565c80bd29 Make sure semicolon is expected after DEFINE_NULL_DATA() 2010-04-22 10:26:35 -04:00
Behdad Esfahbod
bb1e16335e Improve Subst/Pos SubTable access and sanitize 2010-04-22 01:01:35 -04:00
Behdad Esfahbod
81f2af40f9 Simplify Extension offset now that our int types have no alignment 2010-04-22 00:58:49 -04:00
Behdad Esfahbod
19828ad42d Sanitize shallow in Lookup since the generic SubLookup has no methods 2010-04-22 00:50:19 -04:00
Behdad Esfahbod
e5546a4352 Watch for overflow in Array sanitize 2010-04-22 00:48:54 -04:00
Behdad Esfahbod
4f5f1c34dd Rename const_sub_array to sub_array since all consts are implicit now 2010-04-22 00:27:39 -04:00
Behdad Esfahbod
0795b784dd Cosmetic 2010-04-22 00:23:14 -04:00
Behdad Esfahbod
2d98d3bbaa Simplify Lookup sanitize 2010-04-22 00:19:30 -04:00
Behdad Esfahbod
c755cb3e3a Change header comment 2010-04-22 00:11:43 -04:00
Behdad Esfahbod
243d20e011 More cast simplification 2010-04-21 23:57:01 -04:00
Behdad Esfahbod
0dfcc13a46 Rename ConstCharP to CharP (overloaded now) 2010-04-21 23:41:26 -04:00
Behdad Esfahbod
62c0fd7573 Cleanup de-const-casting during sanitize 2010-04-21 23:30:48 -04:00
Behdad Esfahbod
dd15587056 Add more comments 2010-04-21 23:13:33 -04:00
Behdad Esfahbod
c85c362067 Add comment 2010-04-21 23:12:54 -04:00