crypt32: Initialize mask when allocating it.

This commit is contained in:
Juan Lang 2007-10-19 13:36:03 -07:00 committed by Alexandre Julliard
parent a762ffbe14
commit d0e7aaf1be
1 changed files with 3 additions and 0 deletions

View File

@ -1939,7 +1939,10 @@ static void CRYPT_SetBitInField(struct BitField *field, DWORD bit)
else else
field->indexes = CryptMemAlloc(sizeof(DWORD)); field->indexes = CryptMemAlloc(sizeof(DWORD));
if (field->indexes) if (field->indexes)
{
field->indexes[indexIndex] = 0;
field->cIndexes = indexIndex + 1; field->cIndexes = indexIndex + 1;
}
} }
if (field->indexes) if (field->indexes)
field->indexes[indexIndex] |= 1 << (bit % BITS_PER_DWORD); field->indexes[indexIndex] |= 1 << (bit % BITS_PER_DWORD);