From f9cb77f98a5e9758771cd6d226caea1478ab3f1f Mon Sep 17 00:00:00 2001 From: Peter Pentchev Date: Thu, 14 Jan 2010 09:18:15 +0000 Subject: Add an upstream patch as another attempt to fix the vdelivermail segfault. Submitted by: ale --- mail/vpopmail/Makefile | 1 + mail/vpopmail/files/patch-client.c | 49 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) create mode 100644 mail/vpopmail/files/patch-client.c (limited to 'mail/vpopmail') diff --git a/mail/vpopmail/Makefile b/mail/vpopmail/Makefile index 77f402199cb2..5747137adb22 100644 --- a/mail/vpopmail/Makefile +++ b/mail/vpopmail/Makefile @@ -7,6 +7,7 @@ PORTNAME= vpopmail PORTVERSION= 5.4.30 +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-stable/${PORTVERSION} \ SF/${PORTNAME}/${PORTNAME}-devel/${PORTVERSION} diff --git a/mail/vpopmail/files/patch-client.c b/mail/vpopmail/files/patch-client.c new file mode 100644 index 000000000000..3b3ecd27a5ea --- /dev/null +++ b/mail/vpopmail/files/patch-client.c @@ -0,0 +1,49 @@ +Description: Fix a segfault when vpopmaild is not used. +Origin: upstream; http://vpopmail.svn.sourceforge.net/viewvc/vpopmail/tags/v5_4_31/client.c?r1=979&r2=984&view=patch +Last-Update: 2010-01-14 + +--- a/client.c ++++ b/client.c +@@ -65,13 +65,15 @@ + fd_set wfds; + client_handle_t *handle = NULL; + ++ timeout = CLIENT_SERVER_TIMEOUT; ++ memset(socket_file, 0, sizeof(socket_file)); ++ + /* + Load configuration file + */ + + config = config_begin("vusagec.conf"); +- if (config == NULL) +- fprintf(stderr, "client_connect: warning: config_begin failed\n"); ++ if (config) { + + /* + Disabled? +@@ -89,7 +91,6 @@ + Get timeout + */ + +- timeout = CLIENT_SERVER_TIMEOUT; + str = config_fetch_by_name(config, "Server", "Timeout"); + if (str) { + fl = atoi(str); +@@ -103,8 +104,6 @@ + Determine connection type + */ + +- memset(socket_file, 0, sizeof(socket_file)); +- + str = config_fetch_by_name(config, "Server", "Remote"); + if (str) { + ret = ippp_parse(str, &addr); +@@ -131,6 +130,7 @@ + } + + config_kill(config); ++ } + + /* + Allocate a socket -- cgit v1.2.3