Huw Davies : crypt32: Don't write to pvStructInfo if it's NULL.

Alexandre Julliard julliard at winehq.org
Thu Aug 21 10:02:15 CDT 2008


Module: wine
Branch: master
Commit: 3b306c8d6eb216fd5a142b5618bf5407301436ec
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=3b306c8d6eb216fd5a142b5618bf5407301436ec

Author: Huw Davies <huw at codeweavers.com>
Date:   Wed Aug 20 11:21:24 2008 +0100

crypt32: Don't write to pvStructInfo if it's NULL.

---

 dlls/crypt32/decode.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/dlls/crypt32/decode.c b/dlls/crypt32/decode.c
index 64d4818..a624823 100644
--- a/dlls/crypt32/decode.c
+++ b/dlls/crypt32/decode.c
@@ -3942,7 +3942,9 @@ static BOOL WINAPI CRYPT_AsnDecodeSequenceOfAny(DWORD dwCertEncodingType,
                     BYTE *nextPtr;
                     DWORD i;
 
-                    if ((ret = CRYPT_DecodeEnsureSpace(dwFlags, pDecodePara,
+                    if (!pvStructInfo)
+                        *pcbStructInfo = bytesNeeded;
+                    else if ((ret = CRYPT_DecodeEnsureSpace(dwFlags, pDecodePara,
                      pvStructInfo, pcbStructInfo, bytesNeeded)))
                     {
                         if (dwFlags & CRYPT_DECODE_ALLOC_FLAG)




More information about the wine-cvs mailing list