summaryrefslogtreecommitdiffstats
path: root/icu.icu5557.safety.patch
blob: 682caa1d4ed2e3f84b71a331f12b2e2c73721810 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- icu.orig/source/layout/CoverageTables.cpp	2007-01-09 12:57:41.000000000 +0000
+++ icu/source/layout/CoverageTables.cpp	2007-01-09 12:59:09.000000000 +0000
@@ -44,6 +44,11 @@
     le_uint16 count = SWAPW(glyphCount);
     le_uint8 bit = OpenTypeUtilities::highBit(count);
     le_uint16 power = 1 << bit;
+
+    if (count == 0) {
+        return -1;
+    }
+
     le_uint16 extra = count - power;
     le_uint16 probe = power;
     le_uint16 index = 0;