commit | 38b015e57ffa75d3b078a368c23685beb7c3f946 | [log] [tgz] |
---|---|---|
author | Behdad Esfahbod <behdad@behdad.org> | Sun Oct 28 20:11:47 2012 -0700 |
committer | Behdad Esfahbod <behdad@behdad.org> | Sun Oct 28 20:11:47 2012 -0700 |
tree | 1d729679f0c246aa6237503063e85b581573c704 | |
parent | b7115b63be72e109b51f538ba581aed1017b2d55 [diff] [blame] |
Fix hb_buffer_set_length(buffer, 0) Was causing invalid realloc()s.
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc index 2f8f511..b65beff 100644 --- a/src/hb-buffer.cc +++ b/src/hb-buffer.cc
@@ -71,7 +71,7 @@ if (unlikely (_hb_unsigned_int_mul_overflows (size, sizeof (info[0])))) goto done; - while (size > new_allocated) + while (size >= new_allocated) new_allocated += (new_allocated >> 1) + 32; ASSERT_STATIC (sizeof (info[0]) == sizeof (pos[0]));