crypt32: Stop reading a serialized store if a non-context prop ID appears before a context prop ID.

This commit is contained in:
Juan Lang 2009-11-10 12:57:54 -08:00 committed by Alexandre Julliard
parent bc3fa10773
commit 0cf2e6fae6
1 changed files with 12 additions and 2 deletions

View File

@ -499,8 +499,18 @@ static BOOL CRYPT_ReadSerializedStore(void *handle,
CERT_STORE_ADD_NEW, &context);
}
else
ret = CRYPT_ReadContextProp(contextInterface,
context, &propHdr, buf, read);
{
if (!contextInterface)
{
WARN("prop id %d before a context id\n",
propHdr.propID);
ret = FALSE;
}
else
ret = CRYPT_ReadContextProp(
contextInterface, context, &propHdr, buf,
read);
}
}
}
else