Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
b631e0d9
Commit
b631e0d9
authored
Mar 19, 2015
by
Tony Kelman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use swprintf_s everywhere except mingw.org
parent
7aa96593
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
CMakeLists.txt
+1
-2
src/transports/winhttp.c
+7
-3
No files found.
CMakeLists.txt
View file @
b631e0d9
...
...
@@ -186,10 +186,9 @@ IF (WIN32 AND WINHTTP)
INCLUDE_DIRECTORIES
(
deps/winhttp
)
LINK_DIRECTORIES
(
${
LIBWINHTTP_PATH
}
)
LINK_LIBRARIES
(
crypt32
)
ENDIF
()
LINK_LIBRARIES
(
winhttp rpcrt4
)
LINK_LIBRARIES
(
winhttp rpcrt4
crypt32
)
ELSE
()
IF
(
NOT AMIGA AND USE_OPENSSL
)
FIND_PACKAGE
(
OpenSSL
)
...
...
src/transports/winhttp.c
View file @
b631e0d9
...
...
@@ -17,8 +17,9 @@
#include "repository.h"
#include <wincrypt.h>
#pragma comment(lib, "crypt32")
#include <winhttp.h>
/* For IInternetSecurityManager zone check */
#include <objbase.h>
#include <urlmon.h>
...
...
@@ -1006,8 +1007,11 @@ static int put_uuid_string(LPWSTR buffer, size_t buffer_len_cch)
return
-
1
;
}
result
=
wsprintfW
(
buffer
,
#if !defined(__MINGW32__) || defined(MINGW_HAS_SECURE_API)
result
=
swprintf_s
(
buffer
,
buffer_len_cch
,
#else
result
=
wsprintfW
(
buffer
,
#endif
L"%08x%04x%04x%02x%02x%02x%02x%02x%02x%02x%02x"
,
uuid
.
Data1
,
uuid
.
Data2
,
uuid
.
Data3
,
uuid
.
Data4
[
0
],
uuid
.
Data4
[
1
],
uuid
.
Data4
[
2
],
uuid
.
Data4
[
3
],
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment