summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* fixup x509asn1: make encodeOID() return 0 on errorbagder/x509-cleanupDaniel Stenberg2019-02-191-2/+2
|
* x509asn1: cleanup and unify code layoutDaniel Stenberg2019-02-181-116/+131
| | | | | | | | | | - rename 'n' to buflen in functions, and use size_t for them. Don't pass in negative buffer lengths. - move most function comments to above the function starts like we use to - remove several unnecessary typecasts (especially of NULL)
* unit1651: survive curl_easy_init() failsDaniel Stenberg2019-02-181-1/+3
|
* x509asn1: replace single char with an arrayPatrick Monnerat2019-02-181-2/+2
| | | | | | | Although safe in this context, using a single char as an array may cause invalid accesses to adjacent memory locations. Detected by Coverity.
* examples/http2-serverpush: add some sensible error checksDaniel Stenberg2019-02-181-4/+15
| | | | | | To avoid NULL pointer dereferences etc in the case of problems. Closes #3580
* easy: fix win32 init to work without CURL_GLOBAL_WIN32Jay Satiro2019-02-181-49/+60
| | | | | | | | | | | | | | | | | | | | | | | - Change the behavior of win32_init so that the required initialization procedures are not affected by CURL_GLOBAL_WIN32 flag. libcurl via curl_global_init supports initializing for win32 with an optional flag CURL_GLOBAL_WIN32, which if omitted was meant to stop Winsock initialization. It did so internally by skipping win32_init() when that flag was set. Since then win32_init() has been expanded to include required initialization routines that are separate from Winsock and therefore must be called in all cases. This commit fixes it so that CURL_GLOBAL_WIN32 only controls the optional win32 initialization (which is Winsock initialization, according to our doc). The only users affected by this change are those that don't pass CURL_GLOBAL_WIN32 to curl_global_init. For them this commit removes the risk of a potential crash. Ref: https://github.com/curl/curl/pull/3573 Fixes https://github.com/curl/curl/issues/3313 Closes https://github.com/curl/curl/pull/3575
* cookie: Add support for cookie prefixesDaniel Gustafsson2019-02-175-13/+76
| | | | | | | | | | | The draft-ietf-httpbis-rfc6265bis-02 draft, specify a set of prefixes and how they should affect cookie initialization, which has been adopted by the major browsers. This adds support for the two prefixes defined, __Host- and __Secure, and updates the testcase with the supplied examples from the draft. Closes #3554 Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* mbedtls: release sessionid resources on errorDaniel Gustafsson2019-02-161-0/+3
| | | | | | | | | | | If mbedtls_ssl_get_session() fails, it may still have allocated memory that needs to be freed to avoid leaking. Call the library API function to release session resources on this errorpath as well as on Curl_ssl_addsessionid() errors. Closes: #3574 Reported-by: MichaƂ Antoniak <M.Antoniak@posnet.com> Reviewed-by: Daniel Stenberg <daniel@haxx.se>
* cli tool: refactor encoding conversion sequence for switch case fallthrough.Patrick Monnerat2019-02-161-7/+5
|
* version.c: silent scan-build even when librtmp is not enabledPatrick Monnerat2019-02-161-1/+5
|
* RELEASE-NOTES: syncedDaniel Stenberg2019-02-151-2/+48
|
* Curl_now: figure out windows version in win32_initDaniel Stenberg2019-02-152-16/+24
| | | | | | | | | | ... and avoid use of static variables that aren't thread safe. Fixes regression from e9ababd4f5a (present in the 7.64.0 release) Reported-by: Paul Groke Fixes #3572 Closes #3573
* unit1307: just fail without FTP supportMarcel Raad2019-02-151-9/+22
| | | | | | | | I missed to check this in with commit 71786c0505926aaf7e9b2477b2fb7ee16a915ec6, which only disabled the test. This fixes the actual linker error. Closes https://github.com/curl/curl/pull/3568
* travis: enable valgrind for the iconv tests tooDaniel Stenberg2019-02-151-1/+1
| | | | Closes #3571
* travis: add scan-buildDaniel Stenberg2019-02-141-0/+9
| | | | Closes #3564
* examples/sftpuploadresume: Value stored to 'result' is never readDaniel Stenberg2019-02-141-1/+3
| | | | Detected by scan-build
* examples/http2-upload: cleaned upDaniel Stenberg2019-02-141-44/+32
| | | | | Fix scan-build warnings, no globals, no silly handle scan. Also remove handles from the multi before cleaning up.
* examples/http2-download: cleaned upDaniel Stenberg2019-02-141-39/+34
| | | | To avoid scan-build warnings and global variables.
* examples/postinmemory: Potential leak of memory pointed to by 'chunk.memory'Daniel Stenberg2019-02-141-4/+2
| | | | Detected by scan-build
* examples/httpcustomheader: Value stored to 'res' is never readDaniel Stenberg2019-02-141-2/+2
| | | | Detected by scan-build
* examples: remove superfluous null-pointer checksDaniel Stenberg2019-02-143-6/+6
| | | | | | | in ftpget, ftpsget and sftpget, so that scan-build stops warning for potential NULL pointer dereference below! Detected by scan-build
* strip_trailing_dot: make sure NULL is never used for strlenDaniel Stenberg2019-02-141-0/+2
| | | | | scan-build warning: Null pointer passed as an argument to a 'nonnull' parameter
* connection_check: restore original conn->data after the checkJay Satiro2019-02-141-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Save the original conn->data before it's changed to the specified data transfer for the connection check and then restore it afterwards. This is a follow-up to 38d8e1b 2019-02-11. History: It was discovered a month ago that before checking whether to extract a dead connection that that connection should be associated with a "live" transfer for the check (ie original conn->data ignored and set to the passed in data). A fix was landed in 54b201b which did that and also cleared conn->data after the check. The original conn->data was not restored, so presumably it was thought that a valid conn->data was no longer needed. Several days later it was discovered that a valid conn->data was needed after the check and follow-up fix was landed in bbae24c which partially reverted the original fix and attempted to limit the scope of when conn->data was changed to only when pruning dead connections. In that case conn->data was not cleared and the original conn->data not restored. A month later it was discovered that the original fix was somewhat correct; a "live" transfer is needed for the check in all cases because original conn->data could be null which could cause a bad deref at arbitrary points in the check. A fix was landed in 38d8e1b which expanded the scope to all cases. conn->data was not cleared and the original conn->data not restored. A day later it was discovered that not restoring the original conn->data may lead to busy loops in applications that use the event interface, and given this observation it's a pretty safe assumption that there is some code path that still needs the original conn->data. This commit is the follow-up fix for that, it restores the original conn->data after the connection check. Assisted-by: tholin@users.noreply.github.com Reported-by: tholin@users.noreply.github.com Fixes https://github.com/curl/curl/issues/3542 Closes #3559
* memdebug: bring back curl_mark_scloseDaniel Stenberg2019-02-141-2/+2
| | | | | | Used by debug builds with NSS. Reverted from 05b100aee247bb
* transfer.c: do not compute length of undefined hex buffer.Patrick Monnerat2019-02-141-8/+10
| | | | | | | | | On non-ascii platforms, the chunked hex header was measured for char code conversion length, even for chunked trailers that do not have an hex header. In addition, the efective length is already known: use it. Since the hex length can be zero, only convert if needed. Reported by valgrind.
* KNOWN_BUGS: Cannot compile against a static build of OpenLDAPDaniel Stenberg2019-02-141-0/+5
| | | | Closes #2367
* x509asn1: "Dereference of null pointer"Patrick Monnerat2019-02-141-5/+6
| | | | Detected by scan-build (false positive).
* configure: show features as well in the final summaryDaniel Stenberg2019-02-141-0/+1
| | | | Closes #3569
* KNOWN_BUGS: curl compiled on OSX 10.13 failed to run on OSX 10.10Daniel Stenberg2019-02-141-0/+5
| | | | Closes #2905
* KNOWN_BUGS: Deflate error after all content was receivedDaniel Stenberg2019-02-141-0/+10
| | | | Closes #2719
* gssapi: fix deprecated header warningsDaniel Stenberg2019-02-143-26/+14
| | | | | | Heimdal includes on FreeBSD spewed out lots of them. Less so now. Closes #3566
* TODO: Upgrade to websocketsDaniel Stenberg2019-02-141-0/+9
| | | | Closes #3523
* TODO: cmake test suite improvementsDaniel Stenberg2019-02-141-0/+8
| | | | Closes #3109
* curl: "Dereference of null pointer"Patrick Monnerat2019-02-131-2/+2
| | | | Rephrase to satisfy scan-build.
* unit1307: require FTP supportMarcel Raad2019-02-131-0/+1
| | | | | | | | This test doesn't link without FTP support after fc7ab4835b5fd09d0a6f57000633bb6bb6edfda1, which made Curl_fnmatch unavailable without FTP support. Closes https://github.com/curl/curl/pull/3565
* TODO: TFO support on WindowsDaniel Stenberg2019-02-131-0/+8
| | | | | | Nobody works on this now. Closes #3378
* multi: Dereference of null pointerDaniel Stenberg2019-02-131-14/+10
| | | | | | | | Mostly a false positive, but this makes the code easier to read anyway. Detected by scan-build. Closes #3563
* urlglob: Argument with 'nonnull' attribute passed nullDaniel Stenberg2019-02-131-2/+2
| | | | Detected by scan-build.
* schannel: restore some debug output but only for debug buildsJay Satiro2019-02-121-1/+6
| | | | | | | Follow-up to 84c10dc from earlier today which wrapped a lot of the noisy debug output in DEBUGF but omitted a few lines. Ref: https://github.com/curl/curl/commit/84c10dc#r32292900
* examples/crawler: Fix the Accept-Encoding settingJay Satiro2019-02-121-1/+1
| | | | | | | | - Pass an empty string to CURLOPT_ACCEPT_ENCODING to use the default supported encodings. Prior to this change the specific encodings of gzip and deflate were set but there's no guarantee they'd be supported by the user's libcurl.
* mime: put the boundary buffer into the curl_mime structDaniel Stenberg2019-02-122-14/+7
| | | | | | | ... instead of allocating it separately and point to it. It is fixed-size and always used for each part. Closes #3561
* schannel: be quietDaniel Stenberg2019-02-121-63/+77
| | | | | | | | | Convert numerous infof() calls into debug-build only messages since they are annoyingly verbose for regular applications. Removed a few. Bug: https://curl.haxx.se/mail/lib-2019-02/0027.html Reported-by: Volker Schmid Closes #3552
* Curl_resolv: fix a gcc -Werror=maybe-uninitialized warningRomain Geissler2019-02-121-1/+1
| | | | Closes #3562
* http2: multi_connchanged() moved from multi.c, only used for h2Daniel Stenberg2019-02-122-13/+14
| | | | Closes #3557
* curl: "Function call argument is an uninitialized value"Daniel Stenberg2019-02-121-5/+5
| | | | | | | Follow-up to cac0e4a6ad14b42471eb Detected by scan-build Closes #3560
* pretransfer: don't strlen() POSTFIELDS set for GET requestsDaniel Stenberg2019-02-122-2/+4
| | | | | | | | ... since that data won't be used in the request anyway. Fixes #3548 Reported-by: Renaud Allard Close #3549
* multi: remove verbose "Expire in" ... messagesDaniel Stenberg2019-02-121-3/+0
| | | | | | Reported-by: James Brown Bug: https://curl.haxx.se/mail/archive-2019-02/0013.html Closes #3558
* mbedtls: make it build even if MBEDTLS_VERSION_C isn't setDaniel Stenberg2019-02-121-0/+5
| | | | | | Reported-by: MAntoniak on github Fixes #3553 Closes #3556
* non-ascii.c: fix typos in commentsDaniel Gustafsson2019-02-121-2/+2
| | | | Fix two occurrences of s/convers/converts/ spotted while reading code.
* fnmatch: disable if FTP is disabledDaniel Stenberg2019-02-121-2/+4
| | | | Closes #3551