From 06a3cea1cd5dd122b66f6a77feef4c62d5cb91f7 Mon Sep 17 00:00:00 2001 From: Juan Lang Date: Tue, 15 Jun 2010 11:53:22 -0700 Subject: [PATCH] crypt32: Increment current pointer on successful reads from memory. --- dlls/crypt32/serialize.c | 6 ++++++ 1 file changed, 6 insertions(+) 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