fixed msan test

a pointer calculation was wrong in a corner case
This commit is contained in:
Yann Collet 2018-01-06 20:50:36 +01:00
parent 658d6b8588
commit b17fb488b0

View File

@ -122,7 +122,7 @@ static void ZSTD_insertDUBT1(ZSTD_CCtx* zc,
if ( (!extDict)
|| (matchIndex+matchLength >= dictLimit) /* both in current segment*/
|| (current < dictLimit) /* both in extDict */) {
const BYTE* const mBase = !extDict || (matchIndex >= dictLimit) ? base : dictBase;
const BYTE* const mBase = !extDict || ((matchIndex+matchLength) >= dictLimit) ? base : dictBase;
assert( (matchIndex+matchLength >= dictLimit) /* might be wrong if extDict is incorrectly set to 0 */
|| (current < dictLimit) );
match = mBase + matchIndex;