summaryrefslogtreecommitdiff
path: root/icu
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-02-03 09:36:54 +0000
committerCaolán McNamara <caolanm@redhat.com>2011-02-03 11:20:39 +0000
commit54f2e7cd5ff3898184b639624a380d01324100d2 (patch)
tree0adce55782c1f545ef49f050721b87272ad57f82 /icu
parentd1e4f11a9638887dfa708bf476d9c4473705dbb7 (diff)
Resolves: rhbz#674328 more ways for freeserif to crash libicu
Diffstat (limited to 'icu')
-rw-r--r--icu/icu4c.8320.freeserif.crash.patch40
1 files changed, 39 insertions, 1 deletions
diff --git a/icu/icu4c.8320.freeserif.crash.patch b/icu/icu4c.8320.freeserif.crash.patch
index 4e4c3da92742..611fbbd83a69 100644
--- a/icu/icu4c.8320.freeserif.crash.patch
+++ b/icu/icu4c.8320.freeserif.crash.patch
@@ -1,6 +1,16 @@
+--- misc/icu/source/layout/LookupProcessor.h 2011-02-03 09:20:27.657005678 +0000
++++ misc/build/icu/source/layout/LookupProcessor.h 2011-02-03 09:25:34.498396208 +0000
+@@ -58,6 +58,7 @@
+ const FeatureListTable *featureListTable;
+
+ FeatureMask *lookupSelectArray;
++ le_uint32 lookupSelectCount;
+
+ le_uint16 *lookupOrderArray;
+ le_uint32 lookupOrderCount;
--- misc/icu/source/layout/LookupProcessor.cpp 2011-02-02 12:29:54.369077099 +0000
+++ misc/build/icu/source/layout/LookupProcessor.cpp 2011-02-02 12:31:54.215503036 +0000
-@@ -70,6 +70,10 @@
+@@ -62,6 +64,10 @@
if (selectMask != 0) {
const LookupTable *lookupTable = lookupListTable->getLookupTable(lookup);
@@ -11,3 +21,31 @@
le_uint16 lookupFlags = SWAPW(lookupTable->lookupFlags);
glyphIterator.reset(lookupFlags, selectMask);
+@@ -96,6 +102,9 @@
+ for (le_uint16 lookup = 0; lookup < lookupCount; lookup += 1) {
+ le_uint16 lookupListIndex = SWAPW(featureTable->lookupListIndexArray[lookup]);
+
++ if (lookupListIndex >= lookupSelectCount)
++ continue;
++
+ lookupSelectArray[lookupListIndex] |= featureMask;
+ lookupOrderArray[store++] = lookupListIndex;
+ }
+@@ -106,7 +115,7 @@
+ LookupProcessor::LookupProcessor(const char *baseAddress,
+ Offset scriptListOffset, Offset featureListOffset, Offset lookupListOffset,
+ LETag scriptTag, LETag languageTag, const FeatureMap *featureMap, le_int32 featureMapCount, le_bool orderFeatures)
+- : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL),
++ : lookupListTable(NULL), featureListTable(NULL), lookupSelectArray(NULL), lookupSelectCount(0),
+ lookupOrderArray(NULL), lookupOrderCount(0)
+ {
+ const ScriptListTable *scriptListTable = NULL;
+@@ -146,6 +155,8 @@
+ lookupSelectArray[i] = 0;
+ }
+
++ lookupSelectCount = lookupListCount;
++
+ le_int32 count, order = 0;
+ le_int32 featureReferences = 0;
+ const FeatureTable *featureTable = NULL;