=?UTF-8?Q?Andr=C3=A9=20Hentschel=20?=: winhttp/tests: Fix potential crash on BSD.
Alexandre Julliard
julliard at wine.codeweavers.com
Tue Oct 7 14:49:56 CDT 2014
Module: wine
Branch: master
Commit: 6e4d52a752c319855546e4851f40c7077af6c3c2
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6e4d52a752c319855546e4851f40c7077af6c3c2
Author: André Hentschel <nerv at dawncrow.de>
Date: Thu Oct 2 00:33:11 2014 +0200
winhttp/tests: Fix potential crash on BSD.
---
dlls/winhttp/tests/winhttp.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 27fb212..cf2312f 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -876,12 +876,15 @@ static void test_secure_connection(void)
ret = WinHttpQueryOption(req, WINHTTP_OPTION_SECURITY_CERTIFICATE_STRUCT, &info, &size );
ok(ret, "failed to retrieve certificate info %u\n", GetLastError());
- trace("lpszSubjectInfo %s\n", wine_dbgstr_w(info.lpszSubjectInfo));
- trace("lpszIssuerInfo %s\n", wine_dbgstr_w(info.lpszIssuerInfo));
- trace("lpszProtocolName %s\n", wine_dbgstr_w(info.lpszProtocolName));
- trace("lpszSignatureAlgName %s\n", wine_dbgstr_w(info.lpszSignatureAlgName));
- trace("lpszEncryptionAlgName %s\n", wine_dbgstr_w(info.lpszEncryptionAlgName));
- trace("dwKeySize %u\n", info.dwKeySize);
+ if (!ret)
+ {
+ trace("lpszSubjectInfo %s\n", wine_dbgstr_w(info.lpszSubjectInfo));
+ trace("lpszIssuerInfo %s\n", wine_dbgstr_w(info.lpszIssuerInfo));
+ trace("lpszProtocolName %s\n", wine_dbgstr_w(info.lpszProtocolName));
+ trace("lpszSignatureAlgName %s\n", wine_dbgstr_w(info.lpszSignatureAlgName));
+ trace("lpszEncryptionAlgName %s\n", wine_dbgstr_w(info.lpszEncryptionAlgName));
+ trace("dwKeySize %u\n", info.dwKeySize);
+ }
ret = WinHttpReceiveResponse(req, NULL);
ok(ret, "failed to receive response %u\n", GetLastError());
More information about the wine-cvs
mailing list