* Security fixes: - [bsc#1227888, CVE-2024-6197] curl: freeing stack buffer in utf8asn1str - [bsc#1228260, CVE-2024-6874] idn: tweak buffer use when converting with macidn * Changes: - curl: add --ip-tos (IP Type of Service / Traffic Class) - curl: add --mptcp - curl: add --vlan-priority - curl: add -w '%{num_retries} - gnutls: support CA caching - mbedtls: support CURLOPT_CERTINFO - noproxy: patterns need to be comma separated - socket: support binding to interface *AND* IP - tcpkeepalive: add CURLOPT_TCP_KEEPCNT and --keepalive-cnt - urlapi: add CURLU_NO_GUESS_SCHEME - wolfssl: support CA caching * Bugfixes: - connection: shutdown TLS (for FTP) better - curl-config: revert to backticks to support old target envs - curl: allow etag and content-disposition for 3xx reply - curl: bsearch the --write-out variable name - curl: check for --disable case *sensitively* - doh: fix leak and zero-length HTTPS RR crash - file: separate fake headers and body with a stand-alone CRLF - ftp: remove redundant null pointer check in loop condition - gnutls: improve TLS shutdown - gnutls: pass in SNI name, not hostname when checking cert - hostip: skip error check for infallible function call OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=371
42 lines
1.2 KiB
Diff
42 lines
1.2 KiB
Diff
Index: curl-8.5.0/lib/getenv.c
|
|
===================================================================
|
|
--- curl-8.5.0.orig/lib/getenv.c
|
|
+++ curl-8.5.0/lib/getenv.c
|
|
@@ -29,6 +29,14 @@
|
|
|
|
#include "memdebug.h"
|
|
|
|
+#ifndef HAVE_SECURE_GETENV
|
|
+# ifdef HAVE___SECURE_GETENV
|
|
+# define secure_getenv __secure_getenv
|
|
+# else
|
|
+# error neither secure_getenv nor __secure_getenv is available
|
|
+# endif
|
|
+#endif
|
|
+
|
|
static char *GetEnv(const char *variable)
|
|
{
|
|
#if defined(_WIN32_WCE) || defined(CURL_WINDOWS_APP) || \
|
|
@@ -69,7 +77,7 @@ static char *GetEnv(const char *variable
|
|
/* else rc is bytes needed, try again */
|
|
}
|
|
#else
|
|
- char *env = getenv(variable);
|
|
+ char *env = secure_getenv(variable);
|
|
return (env && env[0])?strdup(env):NULL;
|
|
#endif
|
|
}
|
|
Index: curl-8.5.0/configure.ac
|
|
===================================================================
|
|
--- curl-8.5.0.orig/configure.ac
|
|
+++ curl-8.5.0/configure.ac
|
|
@@ -4767,6 +4767,8 @@ if test "x$want_curldebug_assumed" = "xy
|
|
ac_configure_args="$ac_configure_args --enable-curldebug"
|
|
fi
|
|
|
|
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
|
|
+
|
|
AC_CONFIG_FILES([Makefile \
|
|
docs/Makefile \
|
|
docs/examples/Makefile \
|