diff --git a/src/hb-face.cc b/src/hb-face.cc index c492adc24..ad44eff59 100644 --- a/src/hb-face.cc +++ b/src/hb-face.cc @@ -53,7 +53,7 @@ hb_face_count (hb_blob_t *blob) return 0; /* TODO We shouldn't be sanitizing blob. Port to run sanitizer and return if not sane. */ - hb_blob_t *sanitized = OT::Sanitizer ().sanitize (hb_blob_reference (blob)); + hb_blob_t *sanitized = OT::hb_sanitize_context_t().sanitize_blob (hb_blob_reference (blob)); const OT::OpenTypeFontFile& ot = *sanitized->as (); unsigned int ret = ot.get_face_count (); hb_blob_destroy (sanitized); @@ -191,7 +191,7 @@ hb_face_create (hb_blob_t *blob, if (unlikely (!blob)) blob = hb_blob_get_empty (); - hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (OT::Sanitizer().sanitize (hb_blob_reference (blob)), index); + hb_face_for_data_closure_t *closure = _hb_face_for_data_closure_create (OT::hb_sanitize_context_t().sanitize_blob (hb_blob_reference (blob)), index); if (unlikely (!closure)) return hb_face_get_empty (); diff --git a/src/main.cc b/src/main.cc index 873d240a3..c6e05fc37 100644 --- a/src/main.cc +++ b/src/main.cc @@ -51,8 +51,7 @@ main (int argc, char **argv) const char *font_data = hb_blob_get_data (blob, &len); printf ("Opened font file %s: %d bytes long\n", argv[1], len); - Sanitizer sanitizer; - hb_blob_t *font_blob = sanitizer.sanitize (blob); + hb_blob_t *font_blob = hb_sanitize_context_t().sanitize_blob (blob); const OpenTypeFontFile* sanitized = font_blob->as (); if (sanitized == &Null(OpenTypeFontFile)) {