Module: wine Branch: master Commit: 0cf2e6fae6276fe6a3ed56d7f07e910752a87aa4 URL: http://source.winehq.org/git/wine.git/?a=commit;h=0cf2e6fae6276fe6a3ed56d7f0...
Author: Juan Lang juan.lang@gmail.com Date: Tue Nov 10 12:57:54 2009 -0800
crypt32: Stop reading a serialized store if a non-context prop ID appears before a context prop ID.
---
dlls/crypt32/serialize.c | 14 ++++++++++++-- 1 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/serialize.c b/dlls/crypt32/serialize.c index b502110..0c366bf 100644 --- a/dlls/crypt32/serialize.c +++ b/dlls/crypt32/serialize.c @@ -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