From d6016e49108be183ab2dc9c226447d1db3a09b90 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 17 Aug 2011 14:47:41 +0200 Subject: [PATCH] Fix name-table sanitize --- src/hb-ot-name-table.hh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/hb-ot-name-table.hh b/src/hb-ot-name-table.hh index 9fad178c7..0e9f7a419 100644 --- a/src/hb-ot-name-table.hh +++ b/src/hb-ot-name-table.hh @@ -99,15 +99,15 @@ struct name inline bool sanitize_records (hb_sanitize_context_t *c) { TRACE_SANITIZE (); + char *string_pool = (char *) this + stringOffset; unsigned int _count = count; for (unsigned int i = 0; i < _count; i++) - if (!nameRecord[i].sanitize (c, this + stringOffset)) return false; + if (!nameRecord[i].sanitize (c, string_pool)) return false; return true; } inline bool sanitize (hb_sanitize_context_t *c) { TRACE_SANITIZE (); - return true; return c->check_struct (this) && likely (format == 0 || format == 1) && c->check_array (nameRecord, nameRecord[0].static_size, count) &&