Juan Lang : crypt32: Terminate reading a serialized store upon reading an empty property.
Alexandre Julliard
julliard at winehq.org
Wed Jun 16 13:23:20 CDT 2010
Module: wine
Branch: master
Commit: 02b9e3198aa5a62c4f5b9b885365b699088d8e60
URL: http://source.winehq.org/git/wine.git/?a=commit;h=02b9e3198aa5a62c4f5b9b885365b699088d8e60
Author: Juan Lang <juan.lang at gmail.com>
Date: Tue Jun 15 12:17:30 2010 -0700
crypt32: Terminate reading a serialized store upon reading an empty property.
---
dlls/crypt32/serialize.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/crypt32/serialize.c b/dlls/crypt32/serialize.c
index 0c366bf..095a492 100644
--- a/dlls/crypt32/serialize.c
+++ b/dlls/crypt32/serialize.c
@@ -472,7 +472,9 @@ static BOOL CRYPT_ReadSerializedStore(void *handle,
buf = CryptMemAlloc(propHdr.cb);
bufSize = propHdr.cb;
}
- if (buf)
+ if (!propHdr.cb)
+ ; /* Property is empty, nothing to do */
+ else if (buf)
{
ret = read_func(handle, buf, propHdr.cb, &read);
if (ret && read == propHdr.cb)
@@ -516,7 +518,7 @@ static BOOL CRYPT_ReadSerializedStore(void *handle,
else
ret = FALSE;
}
- } while (ret && read > 0);
+ } while (ret && read > 0 && propHdr.cb);
if (contextInterface && context)
{
/* Free the last context added */
More information about the wine-cvs
mailing list