[PATCH] replace bad use of sprintf by 2 strcats

Marcus Meissner marcus at jet.franken.de
Tue Oct 3 12:20:23 CDT 2006


---

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

69acb086a6816f28a47bd473201f71dcd3f75624
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]) );
-- 
1.2.4



More information about the wine-patches mailing list