Commit Graph

1233 Commits

Author SHA1 Message Date
Behdad Esfahbod 1376fb7bf9 [apply] Use a context object to reduce number of parameters passed around 2010-04-29 02:19:21 -04:00
Behdad Esfahbod 173fde7087 Further simplify tracing 2010-04-29 01:47:30 -04:00
Behdad Esfahbod bc20045743 Simplify trace code 2010-04-29 01:40:26 -04:00
Behdad Esfahbod 807c5b03a2 [sanitize] Make debug code always available to the compiler
Such that we don't break debug build all the time.
2010-04-28 23:28:07 -04:00
Behdad Esfahbod 74e313c016 [gsubgpos] Make debug code always available to the compiler
Such that we don't break debug build all the time.
2010-04-28 15:15:09 -04:00
Behdad Esfahbod 41011a6ed7 Fix compiler warning about value unused 2010-04-28 13:33:09 -04:00
Behdad Esfahbod 863df68e89 [object] Make debug code always available to the compiler
Such that we don't break debug build all the time.
2010-04-28 13:29:55 -04:00
Behdad Esfahbod 1d52151a19 Minor 2010-04-28 13:20:31 -04:00
Behdad Esfahbod 444fffb1ab [blob] Make debug code always available to the compiler
Such that we don't break debug build all the time.
2010-04-28 13:16:38 -04:00
Behdad Esfahbod ba51b25c7b Fix build. Ouch! 2010-04-28 13:10:36 -04:00
Behdad Esfahbod a92f0fda7f Fix debug build 2010-04-28 13:09:40 -04:00
Behdad Esfahbod c165f25410 [object] Actually handle malloc() failure
Caught by John Daggett.
2010-04-27 23:28:10 -04:00
Behdad Esfahbod caff7db93d Fix Device::get_size() calculation 2010-04-26 10:07:35 -04:00
Behdad Esfahbod 66d6eb30eb Rename Var to Obj 2010-04-25 23:01:45 -04:00
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