Go to file
Jay Satiro 09363500b9 curl_multibyte: always return a heap-allocated copy of string
- Change the Windows char <-> UTF-8 conversion functions to return an
  allocated copy of the passed in string instead of the original.

Prior to this change the curlx_convert_ functions would, as what I
assume was an optimization, not make a copy of the passed in string if
no conversion was required. No conversion is required in non-UNICODE
Windows builds since our tchar strings are type char and remain in
whatever the passed in encoding is, which is assumed to be UTF-8 but may
be other encoding.

In contrast the UNICODE Windows builds require conversion
(wchar <-> char) and do return a copy. That inconsistency could lead to
programming errors where the developer expects a copy, and does not
realize that won't happen in all cases.

Closes https://github.com/curl/curl/pull/6602
2021-02-20 14:39:39 -05:00
.github CI: fix warning with the latest versions 2020-12-25 16:21:14 +01:00
.muse
CMake cmake: make CURL_ZLIB a tri-state variable 2020-11-19 13:38:47 +01:00
docs http: add new files missed from referrer commit 2021-02-19 16:18:15 +00:00
include http: add support to read and store the referrer header 2021-02-19 13:57:19 +00:00
lib curl_multibyte: always return a heap-allocated copy of string 2021-02-20 14:39:39 -05:00
m4 configure: set -Wextra-semi-stmt for clang with --enable-debug 2020-12-29 23:02:43 +01:00
packages http: add support to read and store the referrer header 2021-02-19 13:57:19 +00:00
plan9 copyright: fix year ranges 2020-11-05 08:22:10 +01:00
projects copyright: fix year ranges 2020-11-05 08:22:10 +01:00
scripts travis: enable quiche's FFI feature 2021-02-01 13:13:12 +00:00
src http: add support to read and store the referrer header 2021-02-19 13:57:19 +00:00
tests http: add support to read and store the referrer header 2021-02-19 13:57:19 +00:00
winbuild winbuild: remove docs from Makefiles and refer to README.md 2020-11-22 23:02:25 +01:00
.azure-pipelines.yml curl.se: new home 2020-11-04 23:59:47 +01:00
.cirrus.yml ci: stop building on freebsd-12-1 2021-02-18 11:21:04 +00:00
.dcignore
.dir-locals.el curl.se: new home 2020-11-04 23:59:47 +01:00
.gitattributes gitattributes: Set batch files to CRLF line endings on checkout 2021-01-14 15:59:56 -05:00
.gitignore
.lgtm.yml curl.se: new home 2020-11-04 23:59:47 +01:00
.mailmap mailmap: Jon Rumsey 2021-02-05 08:46:11 +01:00
.travis.yml travis: install libgsasl-dev to add that to the builds 2021-02-12 09:45:34 +01:00
acinclude.m4 language: s/behaviour/behavior/g 2021-01-02 23:35:59 +01:00
appveyor.yml curl.se: new home 2020-11-04 23:59:47 +01:00
buildconf
buildconf.bat curl.se: new home 2020-11-04 23:59:47 +01:00
CHANGES curl.se: new home 2020-11-04 23:59:47 +01:00
CMakeLists.txt copyright: fix missing year (range) updates 2021-01-29 14:35:13 +01:00
configure.ac gnutls: assume nettle crypto support 2021-02-18 23:06:47 +01:00
COPYING COPYING/configure: bump copyright year range 2021-01-01 00:52:28 +01:00
curl-config.in curl.se: new home 2020-11-04 23:59:47 +01:00
GIT-INFO
libcurl.pc.in Revert "libcurl.pc: make it relocatable" 2020-11-09 09:13:06 +01:00
MacOSX-Framework curl.se: new home 2020-11-04 23:59:47 +01:00
Makefile.am Revert "libcurl.pc: make it relocatable" 2020-11-09 09:13:06 +01:00
Makefile.dist curl.se: new home 2020-11-04 23:59:47 +01:00
maketgz copyright: fix year ranges 2020-11-05 08:22:10 +01:00
README curl.se: new home 2020-11-04 23:59:47 +01:00
README.md curl.se: new home 2020-11-04 23:59:47 +01:00
RELEASE-NOTES RELEASE-NOTES: synced 2021-02-15 08:31:34 +01:00
SECURITY.md

curl logo

CII Best Practices Coverity passed Travis-CI Build Status AppVeyor Build Status Azure DevOps Build Status Cirrus Build Status Backers on Open Collective Sponsors on Open Collective Language Grade: C/C++ Codacy Badge Fuzzing Status

Curl is a command-line tool for transferring data specified with URL syntax. Find out how to use curl by reading the curl.1 man page or the MANUAL document. Find out how to install Curl by reading the INSTALL document.

libcurl is the library curl is using to do its job. It is readily available to be used by your software. Read the libcurl.3 man page to learn how!

You can find answers to the most frequent questions we get in the FAQ document.

Study the COPYING file for distribution terms.

Contact

If you have problems, questions, ideas or suggestions, please contact us by posting to a suitable mailing list.

All contributors to the project are listed in the THANKS document.

Website

Visit the curl website for the latest news and downloads.

Git

To download the very latest source from the Git server do this:

git clone https://github.com/curl/curl.git

(you'll get a directory named curl created, filled with the source code)

Security problems

Report suspected security problems via our HackerOne page and not in public!

Notice

Curl contains pieces of source code that is Copyright (c) 1998, 1999 Kungliga Tekniska Högskolan. This notice is included here to comply with the distribution terms.

Backers

Thank you to all our backers! 🙏 [Become a backer]

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [Become a sponsor]