diff --git a/dlls/crypt32/serialize.c b/dlls/crypt32/serialize.c index 095a492fc68..ab4c48abdc4 100644 --- a/dlls/crypt32/serialize.c +++ b/dlls/crypt32/serialize.c @@ -562,6 +562,12 @@ static BOOL read_blob_wrapper(void *handle, void *buffer, DWORD bytesToRead, { *bytesRead = min(bytesToRead, reader->blob->cbData - reader->current); memcpy(buffer, reader->blob->pbData + reader->current, *bytesRead); + reader->current += *bytesRead; + ret = TRUE; + } + else if (reader->current == reader->blob->cbData) + { + *bytesRead = 0; ret = TRUE; } else