summaryrefslogtreecommitdiff
path: root/src
Commit message (Collapse)AuthorAgeFilesLines
* build: fix Codacy/CppCheck warningsMarcel Raad2019-04-115-7/+6
| | | | | | | | | | - remove unused variables - declare conditionally used variables conditionally - suppress unused variable warnings in the CMake tests - remove dead variable stores - consistently use WIN32 macro to detect Windows Closes https://github.com/curl/curl/pull/3739
* tool_cb_wrt: fix bad-function-cast warningMarcel Raad2019-04-021-5/+3
| | | | | | | | | Commit f5bc578f4cdfdc6c708211dfc2962a0e9d79352d reintroduced the warning fixed in commit 2f5f31bb57d68b54e03bffcd9648aece1fe564f8. Extend fhnd's scope and reuse that variable instead of calling _get_osfhandle a second time to fix the warning again. Closes https://github.com/curl/curl/pull/3718
* tool_help: include <strings.h> for strcasecmpDaniel Stenberg2019-04-011-0/+3
| | | | | | Reported-by: Wyatt O'Day Fixes #3715 Closes #3716
* tool_cb_wrt: fix writing to Windows null device NULJay Satiro2019-03-261-1/+6
| | | | | | | | | | | | - Improve console detection. Prior to this change WriteConsole could be called to write to a handle that may not be a console, which would cause an error. This issue is limited to character devices that are not also consoles such as the null device NUL. Bug: https://github.com/curl/curl/issues/3175#issuecomment-439068724 Reported-by: Gisle Vanem
* tool_getpass: termios.h is present on AmigaOS 3, but no tcgetattr/tcsetattrChris Young2019-03-151-1/+5
|
* tool_operate: build on AmigaOSChris Young2019-03-151-3/+7
|
* makefile: make checksrc and hugefile commands "silent"Daniel Stenberg2019-03-141-13/+23
| | | | | | | ... to match the style already used for compiling, linking etc. Acknowledges 'make V=1' to enable verbose. Closes #3681
* curl.1: mark the argument to --cookie as <data|filename>Daniel Stenberg2019-03-141-1/+1
| | | | | | | | From a discussion in #3676 Suggested-by: Tim Rühsen Closes #3682
* memdebug: make debug-specific functions use curl_dbg_ prefixDaniel Stenberg2019-03-081-3/+3
| | | | | | | To not "collide" or use up the regular curl_ name space. Also makes them easier to detect in helper scripts. Closes #3656
* alt-svc: the curl command line bitsDaniel Stenberg2019-03-035-9/+26
|
* alt-svc: the libcurl bitsDaniel Stenberg2019-03-031-0/+1
|
* curl: display --version features sorted alphabeticallyDaniel Stenberg2019-02-271-3/+23
| | | | Closes #3611
* curl: remove MANUAL from -M outputDaniel Stenberg2019-02-203-33/+8
| | | | | | | | | | | | | | | ... and remove it from the dist tarball. It has served its time, it barely gets updated anymore and "everything curl" is now convering all this document once tried to include, and does it more and better. In the compressed scenario, this removes ~15K data from the binary, which is 25% of the -M output. It remains in the git repo for now for as long as the web site builds a page using that as source. It renders poorly on the site (especially for mobile users) so its not even good there. Closes #3587
* cli tool: fix mime post with --disable-libcurl-option configure optionPatrick Monnerat2019-02-198-127/+181
| | | | | | Reported-by: Marcel Raad Fixes #3576 Closes #3583
* cli tool: refactor encoding conversion sequence for switch case fallthrough.Patrick Monnerat2019-02-161-7/+5
|
* curl: "Dereference of null pointer"Patrick Monnerat2019-02-131-2/+2
| | | | Rephrase to satisfy scan-build.
* urlglob: Argument with 'nonnull' attribute passed nullDaniel Stenberg2019-02-131-2/+2
| | | | Detected by scan-build.
* curl: "Function call argument is an uninitialized value"Daniel Stenberg2019-02-121-5/+5
| | | | | | | Follow-up to cac0e4a6ad14b42471eb Detected by scan-build Closes #3560
* cli tool: do not use mime.h private structures.Patrick Monnerat2019-02-116-481/+544
| | | | | | | | | | Option -F generates an intermediate representation of the mime structure that is used later to create the libcurl mime structure and generate the --libcurl statements. Reported-by: Daniel Stenberg Fixes #3532 Closes #3546
* curl: follow-up to 3f16990ec84Daniel Gustafsson2019-02-111-1/+1
| | | | | | | | Commit 3f16990ec84cc4b followed-up a bug in b49652ac66cc0 but was inadvertently introducing a new bug in the ternary expression. Close #3555 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* curl: follow-up to b49652ac66cc0Daniel Stenberg2019-02-111-1/+1
| | | | | | On FreeBSD, return non-zero on error otherwise zero. Reported-by: Marcel Raad
* curl: fix FreeBSD compiler warning in the --xattr codeDaniel Stenberg2019-02-111-5/+7
| | | | Closes #3550
* tool_operate: fix typecheck warningMarcel Raad2019-02-071-1/+2
| | | | | | | | | | Use long for CURLOPT_HTTP09_ALLOWED to fix the following warning: tool_operate.c: In function 'operate_do': ../include/curl/typecheck-gcc.h:47:9: error: call to '_curl_easy_setopt_err_long' declared with attribute warning: curl_easy_setopt expects a long argument for this option [-Werror] Closes https://github.com/curl/curl/pull/3534
* schannel: stop calling it "winssl"Daniel Stenberg2019-02-013-10/+10
| | | | | | | | Stick to "Schannel" everywhere. The configure option --with-winssl is kept to allow existing builds to work but --with-schannel is added as an alias. Closes #3504
* configure: rewrite --enable-code-coverageDaniel Stenberg2019-01-261-4/+0
| | | | | | | | | The previously used ax_code_coverage.m4 is not license compatible and must not be used. Reported-by: William A. Rowe Jr Fixes #3497 Closes #3499
* src/Makefile: make 'tidy' target work for metalink buildsDaniel Stenberg2019-01-141-2/+2
|
* tool_cb_prg: avoid integer overflowDaniel Stenberg2019-01-111-3/+16
| | | | | | | | When calculating the progress bar width. Reported-by: Peng Li Fixes #3456 Closes #3458
* xattr: strip credentials from any URL that is storedDaniel Stenberg2019-01-101-8/+55
| | | | | | | | | Both user and password are cleared uncondtitionally. Added unit test 1621 to verify. Fixes #3423 Closes #3433
* printf: fix format specifiersRikard Falkeborn2019-01-041-4/+3
| | | | Closes #3426
* tvnow: silence conversion warningsMarcel Raad2019-01-011-1/+1
| | | | | | MinGW-w64 defaults to targeting Windows 7 now, so GetTickCount64 is used and the milliseconds are represented as unsigned long long, leading to a compiler warning when implicitly converting them to long.
* http: added options for allowing HTTP/0.9 responsesDaniel Stenberg2018-12-215-0/+11
| | | | | | | | | | | | Added CURLOPT_HTTP09_ALLOWED and --http0.9 for this purpose. For now, both the tool and library allow HTTP/0.9 by default. docs/DEPRECATE.md lays out the plan for when to reverse that default: 6 months after the 7.64.0 release. The options are added already now so that applications/scripts can start using them already now. Fixes #2873 Closes #3383
* curl -J: do not append to the destination fileDaniel Stenberg2018-12-194-10/+9
| | | | | | Reported-by: Kamil Dudka Fixes #3380 Closes #3381
* docs: fix the --tls-max descriptionDaniel Stenberg2018-12-131-1/+1
| | | | | | | Reported-by: Tobias Lindgren Pointed out in #3367 Closes #3368
* (lib)curl.rc: fixup for minor bugsStefan Kanthak2018-12-101-5/+5
| | | | | | | | | | | | | | | All resources defined in lib/libcurl.rc and curl.rc are language neutral. winbuild/MakefileBuild.vc ALWAYS defines the macro DEBUGBUILD, so the ifdef's in line 33 of lib/libcurl.rc and src/curl.rc are wrong. Replace the hard-coded constants in both *.rc files with #define'd values. Thumbs-uped-by: Rod Widdowson, Johannes Schindelin URL: https://curl.haxx.se/mail/lib-2018-11/0000.html Closes #3348
* curl: fix memory leak reading --writeout from fileDaniel Stenberg2018-11-301-0/+1
| | | | | | | | | If another string had been set first, the writout function for reading the syntax from file would leak the previously allocated memory. Reported-by: Brian Carpenter Fixes #3322 Closes #3330
* tool_main: rename function to make it unique and betterDaniel Stenberg2018-11-301-2/+2
| | | | | ... there's already another function in the curl tool named free_config_fields!
* snprintf: renamed and we now only use msnprintf()Daniel Stenberg2018-11-239-42/+40
| | | | | | | | | | | The function does not return the same value as snprintf() normally does, so readers may be mislead into thinking the code works differently than it actually does. A different function name makes this easier to detect. Reported-by: Tomas Hoger Assisted-by: Daniel Gustafsson Fixes #3296 Closes #3297
* ssl: replace all internal uses of CURLE_SSL_CACERTHan Han2018-11-201-2/+2
| | | | Closes #3291
* tool_doswin: Fix uninitialized field warningDaniel Gustafsson2018-11-181-1/+3
| | | | | | | | | | | | | | | | | | The partial struct initialization in 397664a065abffb7c3445ca9 caused a warning on uninitialized MODULEENTRY32 struct members: /src/tool_doswin.c:681:3: warning: missing initializer for field 'th32ModuleID' of 'MODULEENTRY32 {aka struct tagMODULEENTRY32}' [-Wmissing-field-initializers] This is sort of a bogus warning as the remaining members will be set to zero by the compiler, as all omitted members are. Nevertheless, remove the warning by omitting all members and setting the dwSize members explicitly. Closes #3254 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com> Reviewed-by: Jay Satiro <raysatiro@yahoo.com>
* tool_cb_wrt: Silence function cast compiler warningDaniel Gustafsson2018-11-131-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Commit 5bfaa86ceb3c2a9ac474a928e748c4a86a703b33 introduced a new compiler warning on Windows cross compilation with GCC. See below for an example of the warning from the autobuild logs (whitespace edited to fit): /src/tool_cb_wrt.c:175:9: warning: cast from function call of type 'intptr_t {aka long long int}' to non-matching type 'void *' [-Wbad-function-cast] (HANDLE) _get_osfhandle(fileno(outs->stream)), ^ Store the return value from _get_osfhandle() in an intermediate variable and cast the variable in WriteConsoleW() rather than the function call directly to avoid a compiler warning. In passing, also add inspection of the MultiByteToWideChar() return value and return failure in case an error is reported. Closes #3263 Reviewed-by: Marcel Raad <Marcel.Raad@teamviewer.com> Reviewed-by: Viktor Szakats <commit@vszakats.net>
* curl: --local-port range was not "including"Daniel Stenberg2018-11-091-1/+1
| | | | | | | | | The end port number in a given range was not included in the range used, as it is documented to be. Reported-by: infinnovation-dev on github Fixes #3251 Closes #3255
* curl: --local-port fix followupDaniel Stenberg2018-11-081-1/+1
| | | | | | | | Regression by 52db54869e6. Reported-by: infinnovation-dev on github Fixes #3248 Closes #3249
* curl: fix --local-port integer overflowDaniel Stenberg2018-11-073-14/+26
| | | | | | | | | | The tool's local port command line range parser didn't check for integer overflows and could pass "weird" data to libcurl for this option. libcurl however, has a strict range check for the values so it rejects anything outside of the accepted range. Reported-by: Brian Carpenter Closes #3242
* curl: correct the switch() logic in ourWriteOutDaniel Stenberg2018-11-071-1/+1
| | | | | | | Follow-up to e431daf013, as I did the wrong correction for a compiler warning. It should be a break and not a fall-through. Pointed-out-by: Frank Gevaerts
* curl: add %{stderr} and %{stdout} for --write-outFrank Gevaerts2018-11-071-1/+11
| | | | Closes #3115
* tool: add undocumented option --dump-module-paths for win32Jay Satiro2018-11-063-0/+70
| | | | | | | | | | | | | | | | - Add an undocumented diagnostic option for Windows to show the full paths of all loaded modules regardless of whether or not libcurl initialization succeeds. This is needed so that in the CI we can get a list of all DLL dependencies after initialization (when they're most likely to have finished loading) and then package them as artifacts so that a functioning build can be downloaded. Also I imagine it may have some use as a diagnostic for help requests. Ref: https://github.com/curl/curl/pull/3103 Closes https://github.com/curl/curl/pull/3208
* curl: fixed UTF-8 in current console code page (Windows)Yasuhiro Matsumoto2018-11-052-7/+31
| | | | | | Fixes #3211 Fixes #3175 Closes #3212
* tool_getparam: fix some commentsMichael Kaufmann2018-11-031-13/+5
|
* axtls: removedDaniel Stenberg2018-11-011-21/+1
| | | | | | | | | | As has been outlined in the DEPRECATE.md document, the axTLS code has been disabled for 6 months and is hereby removed. Use a better supported TLS library! Assisted-by: Daniel Gustafsson Closes #3194
* voutf: fix bad arethmetic when outputting warnings to stderrDaniel Stenberg2018-10-301-1/+1
| | | | | | CVE-2018-16842 Reported-by: Brian Carpenter Bug: https://curl.haxx.se/docs/CVE-2018-16842.html