parent
6a7ac79e26
commit
4101ca7dbb
|
@ -126,7 +126,7 @@ hb_blob_create_sub_blob (hb_blob_t *parent,
|
||||||
{
|
{
|
||||||
hb_blob_t *blob;
|
hb_blob_t *blob;
|
||||||
|
|
||||||
if (!length || offset >= parent->length || !(blob = hb_object_create<hb_blob_t> ()))
|
if (!length || offset >= parent->length)
|
||||||
return &_hb_blob_nil;
|
return &_hb_blob_nil;
|
||||||
|
|
||||||
hb_blob_make_immutable (parent);
|
hb_blob_make_immutable (parent);
|
||||||
|
|
|
@ -191,8 +191,8 @@ struct hb_sanitize_context_t
|
||||||
|
|
||||||
inline void setup (void)
|
inline void setup (void)
|
||||||
{
|
{
|
||||||
this->start = hb_blob_get_data (blob, NULL);
|
this->start = hb_blob_get_data (this->blob, NULL);
|
||||||
this->end = this->start + hb_blob_get_length (blob);
|
this->end = this->start + hb_blob_get_length (this->blob);
|
||||||
this->edit_count = 0;
|
this->edit_count = 0;
|
||||||
this->debug_depth = 0;
|
this->debug_depth = 0;
|
||||||
|
|
||||||
|
@ -321,10 +321,8 @@ struct Sanitizer
|
||||||
sane = false;
|
sane = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
c->finish ();
|
|
||||||
} else {
|
} else {
|
||||||
unsigned int edit_count = c->edit_count;
|
unsigned int edit_count = c->edit_count;
|
||||||
c->finish ();
|
|
||||||
if (edit_count && !c->writable) {
|
if (edit_count && !c->writable) {
|
||||||
c->start = hb_blob_get_data_writable (blob, NULL);
|
c->start = hb_blob_get_data_writable (blob, NULL);
|
||||||
c->end = c->start + hb_blob_get_length (blob);
|
c->end = c->start + hb_blob_get_length (blob);
|
||||||
|
@ -339,6 +337,8 @@ struct Sanitizer
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
c->finish ();
|
||||||
|
|
||||||
(void) (HB_DEBUG_SANITIZE &&
|
(void) (HB_DEBUG_SANITIZE &&
|
||||||
fprintf (stderr, "Sanitizer %p %s %s\n", blob, sane ? "passed" : "FAILED", HB_FUNC));
|
fprintf (stderr, "Sanitizer %p %s %s\n", blob, sane ? "passed" : "FAILED", HB_FUNC));
|
||||||
if (sane)
|
if (sane)
|
||||||
|
|
Loading…
Reference in New Issue