ICU-13362 avoid memcmp(nullptr, nullptr, 0)

X-SVN-Rev: 40488
This commit is contained in:
Markus Scherer 2017-09-27 22:51:01 +00:00
parent 80a7f5e4b5
commit f0bfac70f5

View File

@ -419,7 +419,8 @@ CollationDataReader::read(const CollationTailoring *base, const uint8_t *inBytes
tailoring.data, ts, fastLatinPrimaries, UPRV_LENGTHOF(fastLatinPrimaries));
if(options == ts.options && ts.variableTop != 0 &&
reorderCodesLength == ts.reorderCodesLength &&
uprv_memcmp(reorderCodes, ts.reorderCodes, reorderCodesLength * 4) == 0 &&
(reorderCodesLength == 0 ||
uprv_memcmp(reorderCodes, ts.reorderCodes, reorderCodesLength * 4) == 0) &&
fastLatinOptions == ts.fastLatinOptions &&
(fastLatinOptions < 0 ||
uprv_memcmp(fastLatinPrimaries, ts.fastLatinPrimaries,