File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -249,14 +249,15 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) {
249249
250250 sectionSizes = static_cast <const uint32_t *>(udata_getMemory (data));
251251 int32_t dataLength = udata_getLength (data); // This is the length minus the UDataInfo size
252- if (dataLength <= int32_t (sizeof (sectionSizes[0 ]))) {
252+ UBool isDataLengthKnown = dataLength >= 0 ; // Only false when using a pointer table of contents (not files nor a common data archive)
253+ if (isDataLengthKnown && dataLength <= int32_t (sizeof (sectionSizes[0 ]))) {
253254 // We don't even have a TOC!
254255 goto invalidFormat;
255256 }
256257 table = reinterpret_cast <const uint16_t *>(sectionSizes);
257258 tableStart = sectionSizes[0 ];
258259 sizeOfTOC = int32_t ((tableStart + 1 ) * sizeof (sectionSizes[0 ]));
259- if (tableStart < minTocLength || dataLength <= sizeOfTOC) {
260+ if (tableStart < minTocLength || (isDataLengthKnown && dataLength <= sizeOfTOC) ) {
260261 // We don't have a whole TOC!
261262 goto invalidFormat;
262263 }
@@ -279,7 +280,7 @@ static void U_CALLCONV initAliasData(UErrorCode &errCode) {
279280 for (uint32_t section = 1 ; section <= tableStart; section++) {
280281 sizeOfData += sectionSizes[section] * sizeof (table[0 ]);
281282 }
282- if (dataLength < sizeOfData) {
283+ if (isDataLengthKnown && dataLength < sizeOfData) {
283284 // Truncated file!
284285 goto invalidFormat;
285286 }
Original file line number Diff line number Diff line change @@ -7013,7 +7013,7 @@ case "${host}" in
70137013 # We're using gcc, and the simple -a gcc command line works for genccode
70147014 GENCCODE_ASSEMBLY=" -a gcc"
70157015 fi ;;
7016- i * 86- * -solaris* )
7016+ * 86* -solaris* )
70177017 if test " $GCC " = yes; then
70187018 # When using gcc, look if we're also using GNU as.
70197019 # When using GNU as, the simple -a gcc command line works for genccode.
Original file line number Diff line number Diff line change @@ -618,7 +618,7 @@ case "${host}" in
618618 # We're using gcc, and the simple -a gcc command line works for genccode
619619 GENCCODE_ASSEMBLY="-a gcc"
620620 fi ;;
621- i *86- *-solaris*)
621+ *86*-solaris*)
622622 if test "$GCC" = yes; then
623623 # When using gcc, look if we're also using GNU as.
624624 # When using GNU as, the simple -a gcc command line works for genccode.
You can’t perform that action at this time.
0 commit comments