[Libreoffice-commits] core.git: external/icu
Stephan Bergmann
sbergman at redhat.com
Thu Jun 19 14:11:23 PDT 2014
external/icu/icu-ubsan.patch.0 | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
New commits:
commit d77c108922f7ea2c57bc63bbe289bba92f6213a6
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Thu Jun 19 23:05:42 2014 +0200
external/icu: Change flexible array members to be of length 1Â instead of 2
...so that -fsanitize=undefined does not report false out-of-bounds accesses;
Clang's isFlexibleArrayMemberExpr (lib/CodeGen/CGExpr.cpp) only treats arrays of
length 0 and 1 as such special flexible cases.
There appears to be no code in icu that depends on those arrays to be of length
2 (e.g., via sizeof), though it does look suspicious that they are deliberately
of length 2 instead of 1.
Change-Id: I85293e769f1d64cb4e60e13f1cd7f88b76e37487
diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
index ef3121f..01fc290 100644
--- a/external/icu/icu-ubsan.patch.0
+++ b/external/icu/icu-ubsan.patch.0
@@ -1,3 +1,25 @@
+--- source/common/rbbidata.h
++++ source/common/rbbidata.h
+@@ -113,7 +113,7 @@
+ /* StatusTable of the set of matching */
+ /* tags (rule status values) */
+ int16_t fReserved;
+- uint16_t fNextState[2]; /* Next State, indexed by char category. */
++ uint16_t fNextState[1]; /* Next State, indexed by char category. */
+ /* This array does not have two elements */
+ /* Array Size is actually fData->fHeader->fCatCount */
+ /* CAUTION: see RBBITableBuilder::getTableSize() */
+--- source/common/ucmndata.h
++++ source/common/ucmndata.h
+@@ -50,7 +50,7 @@
+
+ typedef struct {
+ uint32_t count;
+- UDataOffsetTOCEntry entry[2]; /* Actual size of array is from count. */
++ UDataOffsetTOCEntry entry[1]; /* Actual size of array is from count. */
+ } UDataOffsetTOC;
+
+ /**
--- source/common/ustring.cpp
+++ source/common/ustring.cpp
@@ -1486,7 +1486,7 @@
More information about the Libreoffice-commits
mailing list