summaryrefslogtreecommitdiff
path: root/pango/opentype/hb-open-type-private.hh
diff options
context:
space:
mode:
Diffstat (limited to 'pango/opentype/hb-open-type-private.hh')
-rw-r--r--pango/opentype/hb-open-type-private.hh2
1 files changed, 1 insertions, 1 deletions
diff --git a/pango/opentype/hb-open-type-private.hh b/pango/opentype/hb-open-type-private.hh
index 9e99175a..d93b8e7a 100644
--- a/pango/opentype/hb-open-type-private.hh
+++ b/pango/opentype/hb-open-type-private.hh
@@ -199,7 +199,7 @@ _hb_sanitize_array (SANITIZE_ARG_DEF,
unsigned int record_size,
unsigned int len)
{
- bool overflows = len >= ((unsigned int) -1) / record_size;
+ bool overflows = record_size > 0 && len >= ((unsigned int) -1) / record_size;
#if HB_DEBUG_SANITIZE
if (sanitize_depth < HB_DEBUG_SANITIZE) \