Zebediah Figura : cryptnet: Open the revocation cache file in binary mode.

Alexandre Julliard julliard at winehq.org
Fri Jan 7 15:04:52 CST 2022


Module: wine
Branch: master
Commit: c51bf452bacf74db921dc7ea700cde66bd9374d9
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=c51bf452bacf74db921dc7ea700cde66bd9374d9

Author: Zebediah Figura <zfigura at codeweavers.com>
Date:   Thu Jan  6 18:47:47 2022 -0600

cryptnet: Open the revocation cache file in binary mode.

Signed-off-by: Zebediah Figura <zfigura at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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);




More information about the wine-cvs mailing list