Assert that blob length doesn't overflow address.

This will crash now, if blob was created with wrong length.
Check for that coming next commit.
This commit is contained in:
Behdad Esfahbod 2014-12-18 18:09:41 -08:00
parent 66e37409b3
commit d5a5052098
1 changed files with 1 additions and 0 deletions

View File

@ -194,6 +194,7 @@ struct hb_sanitize_context_t
{
this->start = hb_blob_get_data (this->blob, NULL);
this->end = this->start + hb_blob_get_length (this->blob);
assert (this->start <= this->end); /* Must not overflow. */
this->edit_count = 0;
this->debug_depth = 0;