Signed-off-by: Hans Leidekker hans@codeweavers.com --- dlls/rsaenh/rsaenh.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-)
diff --git a/dlls/rsaenh/rsaenh.c b/dlls/rsaenh/rsaenh.c index bc10fc731f..c22b3dcaf1 100644 --- a/dlls/rsaenh/rsaenh.c +++ b/dlls/rsaenh/rsaenh.c @@ -3628,17 +3628,18 @@ BOOL WINAPI RSAENH_CPGetHashParam(HCRYPTPROV hProv, HCRYPTHASH hHash, DWORD dwPa &pCryptHash->tpPRFParams.blobSeed, pbData, *pdwDataLen); }
- if ( pbData == NULL ) { - *pdwDataLen = pCryptHash->dwHashSize; - return TRUE; - } - - if (pbData && (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED)) + if (pCryptHash->dwState != RSAENH_HASHSTATE_FINISHED) { finalize_hash(pCryptHash); pCryptHash->dwState = RSAENH_HASHSTATE_FINISHED; }
+ if (!pbData) + { + *pdwDataLen = pCryptHash->dwHashSize; + return TRUE; + } + return copy_param(pbData, pdwDataLen, pCryptHash->abHashValue, pCryptHash->dwHashSize);