[PATCH] cryptnet: Open the revocation cache file in binary mode.

Zebediah Figura zfigura at codeweavers.com
Thu Jan 6 18:47:47 CST 2022


Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
---
 dlls/cryptnet/cryptnet_main.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/cryptnet/cryptnet_main.c b/dlls/cryptnet/cryptnet_main.c
index 2f4e2d895f7..e1b32216353 100644
--- a/dlls/cryptnet/cryptnet_main.c
+++ b/dlls/cryptnet/cryptnet_main.c
@@ -1578,7 +1578,7 @@ static BOOL find_cached_revocation_status(const CRYPT_INTEGER_BLOB *serial,
     FILE *file;
     int len;
 
-    if (!(file = open_cached_revocation_file(serial, L"r", _SH_DENYWR)))
+    if (!(file = open_cached_revocation_file(serial, L"rb", _SH_DENYWR)))
         return FALSE;
 
     if ((len = fread(buffer, 1, sizeof(buffer), file)) != sizeof(buffer)
@@ -1626,7 +1626,7 @@ static void cache_revocation_status(const CRYPT_INTEGER_BLOB *serial,
 {
     FILE *file;
 
-    if (!(file = open_cached_revocation_file(serial, L"w", _SH_DENYRW)))
+    if (!(file = open_cached_revocation_file(serial, L"wb", _SH_DENYRW)))
         return;
     fwrite(revocation_cache_signature, 1, sizeof(revocation_cache_signature), file);
     fwrite(time, sizeof(*time), 1, file);
-- 
2.34.1




More information about the wine-devel mailing list