SHA256
8
0
forked from pool/curl
Files
curl/curl-secure-getenv.patch
Pedro Monreal Gonzalez fe5862c747 - Update to 8.13.0:
* Changes:
    - curl: add write-out variable 'tls_earlydata'
    - curl: make --url support a file with URLs
    - gnutls: set priority via --ciphers
    - IMAP: add CURLOPT_UPLOAD_FLAGS and --upload-flags
    - lib: add CURLFOLLOW_OBEYCODE and CURLFOLLOW_FIRSTONLY
    - OpenSSL/quictls: add support for TLSv1.3 early data
    - rustls: add support for CERTINFO
    - rustls: add support for SSLKEYLOGFILE
    - rustls: support ECH w/ DoH lookup for config
    - rustls: support native platform verifier
    - var: add a '64dec' function that can base64 decode a string
  * Bugfixes:
    - conn: fix connection reuse when SSL is optional
    - hash: use single linked list for entries
    - http2: detect session being closed on ingress handling
    - http2: reset stream on response header error
    - http: remove a HTTP method size restriction
    - http: version negotiation
    - httpsrr: fix port detection
    - libssh: fix freeing of resources in disconnect
    - libssh: fix scp large file upload for 32-bit size_t systems
    - openssl-quic: do not iterate over multi handles
    - openssl: check return value of X509_get0_pubkey
    - openssl: drop support for old OpenSSL/LibreSSL versions
    - openssl: fix crash on missing cert password
    - openssl: fix pkcs11 URI checking for key files.
    - openssl: remove bad `goto`s into other scope
    - setopt: illegal CURLOPT_SOCKS5_AUTH should return error

OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/curl?expand=0&rev=392
2025-04-09 11:35:43 +00:00

42 lines
1.1 KiB
Diff

Index: curl-8.13.0/lib/getenv.c
===================================================================
--- curl-8.13.0.orig/lib/getenv.c
+++ curl-8.13.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(CURL_WINDOWS_UWP) || defined(UNDER_CE) || \
@@ -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.13.0/configure.ac
===================================================================
--- curl-8.13.0.orig/configure.ac
+++ curl-8.13.0/configure.ac
@@ -5384,6 +5384,8 @@ fi
CURL_PREPARE_CONFIGUREHELP_PM
+AC_CHECK_FUNCS([__secure_getenv secure_getenv])
+
AC_CONFIG_FILES([\
Makefile \
docs/Makefile \