Marcus Meissner : crypt32/tests: Replace bad use of sprintf by 2 strcats.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Oct 3 13:37:41 CDT 2006


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

Author: Marcus Meissner <marcus at jet.franken.de>
Date:   Tue Oct  3 19:20:23 2006 +0200

crypt32/tests: Replace bad use of sprintf by 2 strcats.

---

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

diff --git a/dlls/crypt32/tests/sip.c b/dlls/crypt32/tests/sip.c
index 3b57f43..866951f 100644
--- a/dlls/crypt32/tests/sip.c
+++ b/dlls/crypt32/tests/sip.c
@@ -164,8 +164,10 @@ static void test_SIPRetrieveSubjectGUID(
      *
      * Use A-functions where possible as that should be available on all platforms
      */
-    GetEnvironmentVariableA(windir, regeditPath, MAX_PATH);
-    sprintf(regeditPath, "%s\\%s", regeditPath, regeditExe);
+    ret = GetEnvironmentVariableA(windir, regeditPath, MAX_PATH);
+    ok (ret > 0, "expected GEVA(windir) to succeed, last error %d\n", GetLastError());
+    strcat(regeditPath, "\\");
+    strcat(regeditPath, regeditExe);
     MultiByteToWideChar( CP_ACP, 0, regeditPath,
                          strlen(regeditPath)+1, regeditPathW,
                          sizeof(regeditPathW)/sizeof(regeditPathW[0]) );




More information about the wine-cvs mailing list