[coverity] 1543228 Out-of-bounds read

This commit is contained in:
akallabeth 2024-04-11 12:35:39 +02:00 committed by Martin Fleisz
parent 61062128e2
commit cf5df96c14
1 changed files with 1 additions and 0 deletions

View File

@ -592,6 +592,7 @@ static void fips_expand_key_bits(const BYTE* in, size_t in_len, BYTE* out, size_
}
else
{
WINPR_ASSERT(p + 1 < sizeof(buf));
/* c is accumulator */
BYTE c = (BYTE)(buf[p] << r) & 0xFF;
c |= buf[p + 1] >> (8 - r);