pull/2923/head
Garret Rieger 4 years ago committed by Behdad Esfahbod
parent bd2950b393
commit c5c13006a1
  1. 3
      src/hb-repacker.hh
  2. 5
      src/hb-vector.hh
  3. BIN
      test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5179935334465536

@ -147,7 +147,8 @@ struct graph_t
}
vertex_t* v = vertices_.push ();
v->obj = *objects[i];
if (check_success (!vertices_.in_error ()))
v->obj = *objects[i];
if (!removed_nil) continue;
for (unsigned i = 0; i < v->obj.links.length; i++)
// Fix indices to account for removed nil object.

@ -177,6 +177,11 @@ struct hb_vector_t
Type *push (T&& v)
{
Type *p = push ();
if (p == &Crap (Type))
// If push failed to allocate then don't copy v, since this may cause
// the created copy to leak memory since we won't have stored a
// reference to it.
return p;
*p = hb_forward<T> (v);
return p;
}

Loading…
Cancel
Save