1
0
mirror of https://github.com/moparisthebest/curl synced 2024-08-13 17:03:50 -04:00
Commit Graph

22138 Commits

Author SHA1 Message Date
Kamil Dudka
42a4cd4c78 nss: fix a possible use-after-free in SelectClientCert()
... causing a SIGSEGV in showit() in case the handle used to initiate
the connection has already been freed.

This commit fixes a bug introduced in curl-7_19_5-204-g5f0cae803.

Reported-by: Rob Sanders
Bug: https://bugzilla.redhat.com/1436158
2017-07-20 08:09:01 +02:00
Kamil Dudka
c89eb6d0f8 nss: unify the coding style of nss_send() and nss_recv()
No changes in behavior intended by this commit.
2017-07-20 08:08:47 +02:00
Marcel Raad
da6aa3f763
tests/server/resolve.c: fix deprecation warning
MSVC warns that gethostbyname is deprecated. Always use getaddrinfo
instead to fix this when IPv6 is enabled, also for IPv4 resolves. This
is also consistent with what libcurl does.

Closes https://github.com/curl/curl/pull/1682
2017-07-18 10:23:47 +02:00
Jay Satiro
798ad5d924 darwinssl: fix pinnedpubkey build error
- s/SessionHandle/Curl_easy/

Bug: https://github.com/curl/curl/commit/eb16305#commitcomment-23035670
Reported-by: Gisle Vanem
2017-07-17 02:46:07 -04:00
Marcel Raad
38faf041cf
rtspd: fix GCC warning after MSVC warning fix
Older GCC warns:
/tests/server/rtspd.c:1194:10: warning: missing braces around
initializer [-Wmissing-braces]

Fix this by using memset instead of an initializer.
2017-07-16 15:16:46 +02:00
Marcel Raad
fb3b0f25ef
libtest: fix MSVC warning C4706
With warning level 4, MSVC warns about assignments within conditional
expressions. Change the while loop to a do-while loop to fix this. This
change is also consistent with CODE_STYLE.md.
2017-07-16 14:02:59 +02:00
Marcel Raad
0bdb811250
sockfilt: suppress conversion warning with explicit cast
MSVC warns when implicitly casting -1 to unsigned long.
2017-07-16 13:28:45 +02:00
Marcel Raad
70cbefeb5f
rtspd: fix MSVC level 4 warning
warning C4701: potentially uninitialized local variable 'req' used
2017-07-16 13:26:21 +02:00
Marcel Raad
a4bef6a91b
winbuild: re-enable warning C4127 for curl tool
Disabled in cda19a345f. It only needs to
be disabled for libcurl.
2017-07-14 08:52:14 +02:00
Marcel Raad
cda19a345f
winbuild: build with warning level 4
This is consistent with 7bc64561a2, which
changed the warning level from 3 to 4 for the Visual Studio project
files. But disable the level 4 warning C4127 "conditional expression is
constant", as that one is issued by older versions of the Windows SDK
as well as curl itself under some circumstances.

Closes https://github.com/curl/curl/pull/1667
2017-07-13 22:30:33 +02:00
Max Dymond
ffd3162c60 travis: install libidn2
Install libidn2 to increase test coverage (IDN tests)

Closes https://github.com/curl/curl/pull/1673
2017-07-12 22:34:33 -04:00
Marcel Raad
7333b497a0
travis: enable warnings also in release mode
... to get warnings also on Linux/GCC and OSX/clang.

Closes https://github.com/curl/curl/pull/1666
2017-07-12 22:51:10 +02:00
Max Dymond
51ccc4850a travis: install libssh2
Install libssh2 to increase test coverage (SFTP, SCP)
2017-07-12 21:43:33 +02:00
Marcel Raad
b22ec39640
system.h: include winsock2.h before windows.h
... to avoid compiler warnings if the user doesn't want
WIN32_LEAN_AND_MEAN.
2017-07-12 07:55:18 +02:00
Marcel Raad
ef5cac3d8c
build: remove WIN32_LEAN_AND_MEAN from individual build systems
It's defined for all build systems in curl_setup.h since commit
beb08481d0. This caused macro
redefinition warnings in the configure builds.

Closes https://github.com/curl/curl/pull/1677
2017-07-11 18:16:23 +02:00
Jay Satiro
274983b774 ISSUE_TEMPLATE: Add a comment not to file security issues on github 2017-07-11 11:48:37 -04:00
Marcel Raad
beb08481d0
curl_setup: always define WIN32_LEAN_AND_MEAN on Windows
Make sure to always define WIN32_LEAN_AND_MEAN before including any
Windows headers to avoid pulling in unnecessary headers. This avoids
unnecessary macro clashes and compiler warnings.

Ref: https://github.com/curl/curl/issues/1562
Closes https://github.com/curl/curl/pull/1672
2017-07-11 11:57:00 +02:00
Jay Satiro
c5e87fdb7a strerror: Preserve Windows error code in some functions
This is a follow-up to af02162 which removed (SET_)ERRNO macros. That
commit was an earlier draft that I committed by mistake, which was then
remedied by a5834e5 and e909de6, and now this commit. With this commit
there is now no difference between the current code and the changes that
were approved in the final draft.

Thanks-to: Max Dymond, Marcel Raad, Daniel Stenberg, Gisle Vanem
Ref: https://github.com/curl/curl/pull/1589
2017-07-11 01:53:23 -04:00
Max Dymond
e909de65b9
tests: Fix up issues with errno in test files
Closes https://github.com/curl/curl/pull/1671
2017-07-10 16:19:23 +02:00
Daniel Stenberg
a5834e525d errno: fix non-windows builds after af0216251b 2017-07-10 13:59:05 +02:00
Ryan Winograd
793e831bbf make: fix docs build on OpenBSD
Ref: #1591
2017-07-10 13:54:02 +02:00
Marcel Raad
b54e0babd7
ldap: fix MinGW compiler warning
ldap_bind_s is marked as deprecated in w32api's winldap.h shipping with
the latest original MinGW, resulting in compiler warnings since commit
f0fe66f13c. Fix this for the non-SSPI
case by using ldap_simple_bind_s again instead of ldap_bind_s with
LDAP_AUTH_SIMPLE.

Closes https://github.com/curl/curl/pull/1664
2017-07-10 10:22:34 +02:00
Marcel Raad
deadb2348f
curl-compilers.m4: disable warning spam with Cygwin's clang
When building with Cygwin or MinGW, libtool uses a wrapper executable
instead of a wrapper script [1], which is written in C and throws
missing-variable-declarations warnings. Don't enable these warnings on
Cygwin and MinGW in order to avoid warnings for every executable built,
which spams the test suite output when using Cygwin's clang.

[1] https://www.gnu.org/software/libtool/manual/html_node/Wrapper-executables.html

Closes https://github.com/curl/curl/pull/1665
2017-07-10 10:16:29 +02:00
Jay Satiro
af0216251b curl_setup_once: Remove ERRNO/SET_ERRNO macros
Prior to this change (SET_)ERRNO mapped to GetLastError/SetLastError
for Win32 and regular errno otherwise.

I reviewed the code and found no justifiable reason for conflating errno
on WIN32 with GetLastError/SetLastError. All Win32 CRTs support errno,
and any Win32 multithreaded CRT supports thread-local errno.

Fixes https://github.com/curl/curl/issues/895
Closes https://github.com/curl/curl/pull/1589
2017-07-10 02:09:27 -04:00
Jay Satiro
17da675002 tool_getparam: fix potentially uninitialized err 2017-07-09 12:04:42 -04:00
Marcel Raad
59a0fb2439
smb: rename variable to fix shadowing warning
GCC 4.6.3 on travis complains:
smb.c: In function ‘get_posix_time’:
smb.c:725:13: error: declaration of ‘time’ shadows a global declaration
[-Werror=shadow]

Fix this by renaming the variable.
2017-07-09 14:42:13 +02:00
Marcel Raad
f601f42787
tool_cb_wrt: fix variable shadowing warning
GCC 4.4 complains:
tool_cb_wrt.c:81: error: declaration of ‘isatty’ shadows a global
declaration
/usr/include/unistd.h:782: error: shadowed declaration is here

Fix this by renaming the variable.

Closes https://github.com/curl/curl/pull/1661
2017-07-09 14:38:10 +02:00
Daniel Stenberg
a548183546 RELEASE-NOTES: synced with be2c999b8 2017-07-08 00:15:17 +02:00
Daniel Stenberg
ca3545d17f travis: install stunnel 2017-07-07 17:25:43 +02:00
Daniel Stenberg
be2c999b80 valgrind.supp: supress OpenSSL false positive seen on travis 2017-07-07 16:58:08 +02:00
Daniel Stenberg
8b78f7c23d travis: detect and use valgrind for normal builds
Closes #1653
2017-07-07 16:58:08 +02:00
Daniel Stenberg
7bcaa1aa27 travis: add SMB, DICT, TELNET torture to coverage test 2017-07-07 14:42:45 +02:00
Paul Harris
45f39945ec cmake: offer CMAKE_DEBUG_POSTFIX when building with MSVC
Removes BUILD_RELEASE_DEBUG_DIRS since it wasn't used anywhere.

Closes #1649
2017-07-07 14:29:26 +02:00
Daniel Stenberg
bbc9c6d144 CURLOPT_POSTFIELDS.3: explain the 100-continue magic better 2017-07-07 12:43:17 +02:00
Max Dymond
06a6feba9d test1452: add telnet negotiation
Add a basic telnet server for negotiating some telnet options before
echoing back any data that's sent to it.

Closes #1645
2017-07-07 11:00:26 +02:00
Daniel Stenberg
efedafe48a travis: do more tests in the coverage run
I added a selection of torture and event tests that run "fast enough"
2017-07-07 10:58:33 +02:00
Daniel Stenberg
a126ca8481 curl_easy_escape.3: mention the (lack of) encoding
Fixes #1612
Reported-by: Jeroen Ooms
2017-07-07 10:47:46 +02:00
Gisle Vanem
0cec0f4615 memdebug: don't setbuf() if the file open failed
Bug: https://github.com/curl/curl/issues/828#issuecomment-313475151
2017-07-06 23:15:00 +02:00
Daniel Stenberg
2d86e8d128 appveyor: enable CURL_WERROR on all builds 2017-07-06 17:06:24 +02:00
Daniel Stenberg
ce81aeb877 cmake: add CURL_WERROR for enabling "warning as errors" 2017-07-06 17:06:24 +02:00
Hannes Magnusson
75c3596f75 cmake: remove spurious "-l" from linker flags
Fixes #1552
2017-07-06 12:21:20 +02:00
Daniel Stenberg
23b828b78b test506: skip if threaded-resolver 2017-07-06 11:49:50 +02:00
Daniel Stenberg
759efe7b51 runtests: support "threaded-resolver" as a feature
... to let tests require it or skip if present
2017-07-06 11:49:50 +02:00
Daniel Stenberg
6b0aa00abb asyn-thread.c: fix unused variable warnings on macOS 2017-07-06 11:49:50 +02:00
Daniel Stenberg
b22f93dbb8 http: s/TINY_INITIAL_POST_SIZE/EXPECT_100_THRESHOLD
Make the name reflect its use better, and add a short comment describing
what it's for.
2017-07-06 11:20:57 +02:00
Daniel Stenberg
9ee6cb1b77 cmake: if inet_pton is used, bump _WIN32_WINNT
... and make sure inet_pton is always checked for when *not* using Windows,
which is a regression from 4fc6ebe18.

Idea-by: Sergei Nikulov
2017-07-05 13:28:28 +02:00
Daniel Stenberg
7e21e5fd0c select.h: avoid macro redefinition harder
... by checking the POLLIN define, as the header file checks don't work
on Windows.
2017-07-05 13:28:28 +02:00
Daniel Stenberg
21e0705734 inet_pton: fix include on windows to get prototype
inet_pton() exists on Windows and gets used by our cmake builds. Make
sure the correct header file is included to avoid compiler warnings.

Closes #1639
2017-07-05 13:28:19 +02:00
Daniel Stenberg
da08c867e4 TODO: 1.10 auto-detect proxy
Closes #1572
2017-07-05 10:07:56 +02:00
Daniel Stenberg
add0f7119f TODO: HTTP proxy CONNECT is non-blocking now 2017-07-05 10:00:26 +02:00