16390176 parfait issues in fetchmail
authorJohn Beck <John.Beck@Oracle.COM>
Mon, 25 Feb 2013 11:31:59 -0800
changeset 1175 3b79e6aa942a
parent 1174 5ac53682aef3
child 1176 d62659e7da8a
16390176 parfait issues in fetchmail 16390242 enable ASLR for fetchmail
components/fetchmail/Makefile
components/fetchmail/patches/16390176.patch
--- a/components/fetchmail/Makefile	Mon Feb 25 11:30:46 2013 -0800
+++ b/components/fetchmail/Makefile	Mon Feb 25 11:31:59 2013 -0800
@@ -20,7 +20,7 @@
 #
 
 #
-# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
+# Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
 #
 
 include ../../make-rules/shared-macros.mk
@@ -45,6 +45,8 @@
 CONFIGURE_OPTIONS  +=		--with-ssl
 CONFIGURE_OPTIONS  +=		--enable-NTLM
 
+ASLR_MODE = $(ASLR_ENABLE)
+
 # common targets
 build:		$(BUILD_32)
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/fetchmail/patches/16390176.patch	Mon Feb 25 11:31:59 2013 -0800
@@ -0,0 +1,21 @@
+# This patch should be removed when we upgrade to 6.3.25; see the bug report
+# for full context.
+--- fetchmail/socket.c.orig	2012-08-13 13:02:41.000000000 -0700
++++ fetchmail/socket.c	2013-02-11 15:44:05.297674654 -0800
+@@ -133,6 +133,7 @@
+ 	argvec = (char **)malloc(s);
+ 	if (!argvec)
+ 	{
++		free(plugin_copy);
+ 		report(stderr, GT_("fetchmail: malloc failed\n"));
+ 		return NULL;
+ 	}
+@@ -186,6 +187,8 @@
+ 		if (outlevel >= O_VERBOSE)
+ 		    report(stderr, GT_("running %s (host %s service %s)\n"), plugin, host, service);
+ 		argvec = parse_plugin(plugin,host,service);
++		if (argvec == NULL)
++			_exit(EXIT_FAILURE);
+ 		execvp(*argvec, argvec);
+ 		report(stderr, GT_("execvp(%s) failed\n"), *argvec);
+ 		_exit(EXIT_FAILURE);