Francois Gouget : crypt32: Fix filetime_to_str() for the case where it is called twice for a single trace.

Alexandre Julliard julliard at winehq.org
Mon Sep 19 13:48:43 CDT 2011


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

Author: Francois Gouget <fgouget at free.fr>
Date:   Sun Sep 18 22:55:20 2011 +0200

crypt32: Fix filetime_to_str() for the case where it is called twice for a single trace.

---

 dlls/crypt32/chain.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/crypt32/chain.c b/dlls/crypt32/chain.c
index 4bc2d05..2c6732d 100644
--- a/dlls/crypt32/chain.c
+++ b/dlls/crypt32/chain.c
@@ -1664,7 +1664,7 @@ static void dump_extension(const CERT_EXTENSION *ext)
 
 static LPCSTR filetime_to_str(const FILETIME *time)
 {
-    static char date[80];
+    char date[80];
     char dateFmt[80]; /* sufficient for all versions of LOCALE_SSHORTDATE */
     SYSTEMTIME sysTime;
 
@@ -1675,7 +1675,7 @@ static LPCSTR filetime_to_str(const FILETIME *time)
     FileTimeToSystemTime(time, &sysTime);
     GetDateFormatA(LOCALE_SYSTEM_DEFAULT, 0, &sysTime, dateFmt, date,
      sizeof(date) / sizeof(date[0]));
-    return date;
+    return wine_dbg_sprintf("%s", date);
 }
 
 static void dump_element(PCCERT_CONTEXT cert)




More information about the wine-cvs mailing list