[pango] Bug 592484 - invalid write in HB
- From: Behdad Esfahbod <behdad src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [pango] Bug 592484 - invalid write in HB
- Date: Thu, 20 Aug 2009 18:04:06 +0000 (UTC)
commit 4c68b4bf575e6d02c658507374c9fb3cb0f958c6
Author: Behdad Esfahbod <behdad behdad org>
Date: Thu Aug 20 14:01:37 2009 -0400
Bug 592484 - invalid write in HB
Fix off-by-one.
pango/opentype/hb-ot-layout.cc | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/pango/opentype/hb-ot-layout.cc b/pango/opentype/hb-ot-layout.cc
index 8d0a25a..8882327 100644
--- a/pango/opentype/hb-ot-layout.cc
+++ b/pango/opentype/hb-ot-layout.cc
@@ -226,8 +226,8 @@ _hb_ot_layout_set_glyph_class (hb_face_t *face,
unsigned char *new_klasses;
new_len = len == 0 ? 120 : 2 * len;
- if (new_len > 65535)
- new_len = 65535;
+ if (new_len > 65536)
+ new_len = 65536;
new_klasses = (unsigned char *) realloc (layout->new_gdef.klasses, new_len * sizeof (unsigned char));
if (HB_UNLIKELY (!new_klasses))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]