Alexandre Julliard : cryptnet/tests: Avoid using snprintf().

Alexandre Julliard julliard at winehq.org
Tue Apr 23 17:39:53 CDT 2019


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

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Tue Apr 23 11:12:00 2019 +0200

cryptnet/tests: Avoid using snprintf().

Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/cryptnet/tests/cryptnet.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/cryptnet/tests/cryptnet.c b/dlls/cryptnet/tests/cryptnet.c
index 8600fda..0b01760 100644
--- a/dlls/cryptnet/tests/cryptnet.c
+++ b/dlls/cryptnet/tests/cryptnet.c
@@ -316,7 +316,7 @@ static void make_tmp_file(LPSTR path)
 static void test_retrieveObjectByUrl(void)
 {
     BOOL ret;
-    char tmpfile[MAX_PATH * 2], url[MAX_PATH + 8];
+    char tmpfile[MAX_PATH], url[MAX_PATH + 8];
     CRYPT_BLOB_ARRAY *pBlobArray;
     PCCERT_CONTEXT cert;
     PCCRL_CONTEXT crl;
@@ -332,7 +332,7 @@ static void test_retrieveObjectByUrl(void)
        GetLastError(), GetLastError());
 
     make_tmp_file(tmpfile);
-    snprintf(url, sizeof(url), "file://%s", tmpfile);
+    sprintf(url, "file://%s", tmpfile);
 
     pBlobArray = (CRYPT_BLOB_ARRAY *)0xdeadbeef;
     ret = CryptRetrieveObjectByUrlA(url, NULL, 0, 0, (void **)&pBlobArray,




More information about the wine-cvs mailing list