aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-01-23 18:26:38 +0000
committerPo-Chuan Hsieh <sunpoet@FreeBSD.org>2022-01-23 19:09:47 +0000
commitb2bd4ad8c484a613957005212289963a6b249445 (patch)
tree6812e174294170ea42bd453601fac3ee113d1c64
parent10212df6567f632fdf19f15fd7c040cd6b53b041 (diff)
downloadports-b2bd4ad8c484a613957005212289963a6b249445.tar.gz
ports-b2bd4ad8c484a613957005212289963a6b249445.zip
ftp/pure-ftpd: Fix SIGSEGV with PostgeSQL backend
- Bump PORTREVISION for package change PR: 261358 Reported by: Artyom Davidov <ard_1@mail.ru> Obtained from: https://github.com/jedisct1/pure-ftpd/commit/c3f0f3c91d86939e6fabf5f65c6c6fc964e6032e
-rw-r--r--ftp/pure-ftpd/Makefile1
-rw-r--r--ftp/pure-ftpd/files/patch-src-log_pgsql.c29
2 files changed, 30 insertions, 0 deletions
diff --git a/ftp/pure-ftpd/Makefile b/ftp/pure-ftpd/Makefile
index 560d2b6b215b..ef8908ca1aca 100644
--- a/ftp/pure-ftpd/Makefile
+++ b/ftp/pure-ftpd/Makefile
@@ -2,6 +2,7 @@
PORTNAME= pure-ftpd
PORTVERSION= 1.0.50
+PORTREVISION= 1
CATEGORIES= ftp
MASTER_SITES= https://github.com/jedisct1/pure-ftpd/releases/download/${PORTVERSION}/ \
https://download.pureftpd.org/pub/pure-ftpd/releases/
diff --git a/ftp/pure-ftpd/files/patch-src-log_pgsql.c b/ftp/pure-ftpd/files/patch-src-log_pgsql.c
new file mode 100644
index 000000000000..b8b6a3b9ae92
--- /dev/null
+++ b/ftp/pure-ftpd/files/patch-src-log_pgsql.c
@@ -0,0 +1,29 @@
+Obtained from: https://github.com/jedisct1/pure-ftpd/commit/c3f0f3c91d86939e6fabf5f65c6c6fc964e6032e
+
+--- src/log_pgsql.c.orig 2021-11-23 21:36:05 UTC
++++ src/log_pgsql.c
+@@ -278,7 +278,6 @@ static int pw_pgsql_connect(PGconn ** const id_sql_ser
+ *id_sql_server = NULL;
+
+ if ((escaped_server = pw_pgsql_escape_conninfo(server)) == NULL ||
+- (escaped_port = pw_pgsql_escape_conninfo(port)) == NULL ||
+ (escaped_db = pw_pgsql_escape_conninfo(db)) == NULL ||
+ (escaped_user = pw_pgsql_escape_conninfo(user)) == NULL ||
+ (escaped_pw = pw_pgsql_escape_conninfo(pw)) == NULL) {
+@@ -296,7 +295,7 @@ static int pw_pgsql_connect(PGconn ** const id_sql_ser
+ }
+ if (SNCHECK(snprintf(conninfo, sizeof_conninfo,
+ PGSQL_CONNECT_FMTSTRING,
+- escaped_server, escaped_port, escaped_db,
++ escaped_server, port, escaped_db,
+ escaped_user, escaped_pw), sizeof_conninfo)) {
+ goto bye;
+ }
+@@ -314,7 +313,6 @@ static int pw_pgsql_connect(PGconn ** const id_sql_ser
+ bye:
+ free(conninfo);
+ free(escaped_server);
+- free(escaped_port);
+ free(escaped_db);
+ free(escaped_user);
+ free(escaped_pw);