Minor
This commit is contained in:
parent
eba1c16a60
commit
2a46a020fd
|
@ -186,7 +186,7 @@ struct hb_sanitize_context_t :
|
||||||
inline void start_processing (void)
|
inline void start_processing (void)
|
||||||
{
|
{
|
||||||
this->start = hb_blob_get_data (this->blob, nullptr);
|
this->start = hb_blob_get_data (this->blob, nullptr);
|
||||||
this->end = this->start + hb_blob_get_length (this->blob);
|
this->end = this->start + this->blob->length;
|
||||||
assert (this->start <= this->end); /* Must not overflow. */
|
assert (this->start <= this->end); /* Must not overflow. */
|
||||||
this->max_ops = MAX ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR,
|
this->max_ops = MAX ((unsigned int) (this->end - this->start) * HB_SANITIZE_MAX_OPS_FACTOR,
|
||||||
(unsigned) HB_SANITIZE_MAX_OPS_MIN);
|
(unsigned) HB_SANITIZE_MAX_OPS_MIN);
|
||||||
|
@ -329,7 +329,7 @@ struct Sanitizer
|
||||||
unsigned int edit_count = c->edit_count;
|
unsigned int edit_count = c->edit_count;
|
||||||
if (edit_count && !c->writable) {
|
if (edit_count && !c->writable) {
|
||||||
c->start = hb_blob_get_data_writable (blob, nullptr);
|
c->start = hb_blob_get_data_writable (blob, nullptr);
|
||||||
c->end = c->start + hb_blob_get_length (blob);
|
c->end = c->start + blob->length;
|
||||||
|
|
||||||
if (c->start) {
|
if (c->start) {
|
||||||
c->writable = true;
|
c->writable = true;
|
||||||
|
|
|
@ -364,7 +364,7 @@ struct kern
|
||||||
{
|
{
|
||||||
blob = Sanitizer<kern>().sanitize (face->reference_table (HB_OT_TAG_kern));
|
blob = Sanitizer<kern>().sanitize (face->reference_table (HB_OT_TAG_kern));
|
||||||
table = blob->as<kern> ();
|
table = blob->as<kern> ();
|
||||||
table_length = hb_blob_get_length (blob);
|
table_length = blob->length;
|
||||||
}
|
}
|
||||||
inline void fini (void)
|
inline void fini (void)
|
||||||
{
|
{
|
||||||
|
|
|
@ -77,9 +77,9 @@ _hb_ot_layout_create (hb_face_t *face)
|
||||||
* See this thread for why we finally had to bend in and do this:
|
* See this thread for why we finally had to bend in and do this:
|
||||||
* https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html
|
* https://lists.freedesktop.org/archives/harfbuzz/2016-February/005489.html
|
||||||
*/
|
*/
|
||||||
unsigned int gdef_len = hb_blob_get_length (layout->gdef_blob);
|
unsigned int gdef_len = layout->gdef_blob->length;
|
||||||
unsigned int gsub_len = hb_blob_get_length (layout->gsub_blob);
|
unsigned int gsub_len = layout->gsub_blob->length;
|
||||||
unsigned int gpos_len = hb_blob_get_length (layout->gpos_blob);
|
unsigned int gpos_len = layout->gpos_blob->length;
|
||||||
if (0
|
if (0
|
||||||
/* sha1sum:c5ee92f0bca4bfb7d06c4d03e8cf9f9cf75d2e8a Windows 7? timesi.ttf */
|
/* sha1sum:c5ee92f0bca4bfb7d06c4d03e8cf9f9cf75d2e8a Windows 7? timesi.ttf */
|
||||||
|| (442 == gdef_len && 42038 == gpos_len && 2874 == gsub_len)
|
|| (442 == gdef_len && 42038 == gpos_len && 2874 == gsub_len)
|
||||||
|
|
|
@ -111,7 +111,7 @@ struct post
|
||||||
{
|
{
|
||||||
blob = Sanitizer<post>().sanitize (face->reference_table (HB_OT_TAG_post));
|
blob = Sanitizer<post>().sanitize (face->reference_table (HB_OT_TAG_post));
|
||||||
const post *table = blob->as<post> ();
|
const post *table = blob->as<post> ();
|
||||||
unsigned int table_length = hb_blob_get_length (blob);
|
unsigned int table_length = blob->length;
|
||||||
|
|
||||||
version = table->version.to_int ();
|
version = table->version.to_int ();
|
||||||
index_to_offset.init ();
|
index_to_offset.init ();
|
||||||
|
|
Loading…
Reference in New Issue