adjust BIO_vprintf replacement patch; use #ifdef LIBRESSL_VERSION_NUMBER

so that the patch shows up in grep, and use %s when passing the assembled
string to BIO_printf.
This commit is contained in:
sthen
2025-09-18 06:16:28 +00:00
parent 31c3dec0d5
commit 20915aada0
2 changed files with 12 additions and 4 deletions
+1
View File
@@ -1,6 +1,7 @@
COMMENT = HTTP reverse proxy/load balancer/SSL offload
V = 4.17
REVISION = 0
DISTNAME = pound-$V
PKGNAME = ${DISTNAME:L}
+11 -4
View File
@@ -1,19 +1,26 @@
Index: src/poundctl.c
--- src/poundctl.c.orig
+++ src/poundctl.c
@@ -840,11 +840,14 @@ static void
@@ -840,11 +840,22 @@ static void
send_request (BIO *bio, char const *method, char const *fmt, ...)
{
va_list ap;
+#ifdef LIBRESSL_VERSION_NUMBER
+ char *tempstr;
+#endif
BIO_printf (bio, "%s %s/", method, url->path);
+#ifndef LIBRESSL_VERSION_NUMBER
va_start (ap, fmt);
- BIO_vprintf (bio, fmt, ap);
+ vasprintf (&tempstr, fmt, ap);
BIO_vprintf (bio, fmt, ap);
va_end (ap);
+ BIO_printf (bio, tempstr);
+#else
+ va_start (ap, fmt);
+ vasprintf (&tempstr, fmt, ap);
+ va_end (ap);
+ BIO_printf (bio, "%s", tempstr);
+ free(tempstr);
+#endif
BIO_printf (bio, " HTTP/1.1\r\n"
"Host: %s\r\n",
url->host);