From d16ccc4ae7aa8be460881042413fa2637929fede Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Wed, 18 Jul 2012 15:43:55 -0400 Subject: Leave one extra item at the end of buffer allocation Just in case, for the times we do out-of-bounds access. jk --- src/hb-buffer-private.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/hb-buffer-private.hh') diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh index 9bd80e0f..e06a7fa3 100644 --- a/src/hb-buffer-private.hh +++ b/src/hb-buffer-private.hh @@ -148,7 +148,7 @@ struct hb_buffer_t { HB_INTERNAL bool enlarge (unsigned int size); inline bool ensure (unsigned int size) - { return likely (size <= allocated) ? true : enlarge (size); } + { return likely (size < allocated) ? true : enlarge (size); } HB_INTERNAL bool make_room_for (unsigned int num_in, unsigned int num_out); -- cgit v1.2.3