summaryrefslogtreecommitdiffstats
path: root/icu.icu5500.devicetablecrash.patch
blob: 16ea5b757219eaaee6b9ea0cbc3af1d859dd75d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
--- icu.orig/source/layout/DeviceTables.cpp	2006-10-18 09:05:20.000000000 +0100
+++ icu/source/layout/DeviceTables.cpp	2006-11-08 09:08:09.000000000 +0000
@@ -22,7 +22,7 @@
     le_uint16 format = SWAPW(deltaFormat) - 1;
     le_int16 result = 0;
     
-    if (ppem >= start && ppem <= SWAPW(endSize)) {
+    if (ppem >= start && ppem <= SWAPW(endSize) && format < sizeof(fieldBits)/sizeof(fieldBits[0])) {
         le_uint16 sizeIndex = ppem - start;
         le_uint16 bits = fieldBits[format];
         le_uint16 count = 16 / bits;