tpm2: Fix a potential overflow expression (coverity)

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
This commit is contained in:
Stefan Berger 2022-05-28 13:38:46 -04:00 committed by Stefan Berger
parent 3b047cb5fe
commit 77950dd917

View File

@ -426,7 +426,7 @@ BnSetBit(
// Grow the number if necessary to set the bit.
while(bn->size <= offset)
bn->d[bn->size++] = 0;
bn->d[offset] |= (crypt_uword_t)(1 << RADIX_MOD(bitNum));
bn->d[offset] |= ((crypt_uword_t)1 << RADIX_MOD(bitNum));
return TRUE;
}
/* 10.2.3.3.17 BnTestBit() */