From 0a99cfd911577cd7f56c82415437acfd8c213474 Mon Sep 17 00:00:00 2001 From: mi Date: Mon, 29 Oct 2007 00:18:59 +0000 Subject: The fix for a double-free problem was provided by the package maintainer (Kari Hurtta) within 24 hours after reporting. Add the patch to the port - it should not be neccessary at the next update. Bump PORTREVISION. Also change pre-install to pre-su-install to allow a non-root user to install the freshly-built port. Approved by: maintainer --- mail/elm+ME/Makefile | 3 ++- mail/elm+ME/files/patch-search-fix | 24 ++++++++++++++++++++++++ 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 mail/elm+ME/files/patch-search-fix (limited to 'mail') diff --git a/mail/elm+ME/Makefile b/mail/elm+ME/Makefile index a38df0848a44..d910400c47b8 100644 --- a/mail/elm+ME/Makefile +++ b/mail/elm+ME/Makefile @@ -7,6 +7,7 @@ PORTNAME= elm+ME PORTVERSION= ${ELM_VERSION}.${ELM_REVISION}${ELM_PATCHLEVEL:S/_//} +PORTREVISION= 1 CATEGORIES= mail MASTER_SITES= http://www.elmme-mailer.org/ \ ftp://ftp.elmme-mailer.org/elmme-mailer.org/src/elm-2.4ME+/ \ @@ -220,7 +221,7 @@ rename-readmes: # Pre-install # -pre-install: create-install-dirs backup-conf-files +pre-su-install: create-install-dirs backup-conf-files create-install-dirs: @${MKDIR} ${CONF_DIR} ${LIB_DIR} ${SHLIB_DIR} diff --git a/mail/elm+ME/files/patch-search-fix b/mail/elm+ME/files/patch-search-fix new file mode 100644 index 000000000000..8f378c3156ff --- /dev/null +++ b/mail/elm+ME/files/patch-search-fix @@ -0,0 +1,24 @@ +The meaningful part of the patch obtained from Kari E. Hurtta +(elm+ME maintainer), which fixes a double-free in parsing of +certain MIME e-mails. The patch should be included in the next +release of elm. + +--- melib/mime_decode.c 25 Aug 2007 11:51:51 -0000 2.0 ++++ melib/mime_decode.c 28 Oct 2007 07:39:29 -0000 2.2 +@@ -2525,11 +2525,13 @@ + unlink(fname); /* Unlink was delayed */ + *name = NULL; + } +- free(fname); +- } + +- if (!name) + free(fname); ++ ++ } else { ++ if (!name) ++ free(fname); ++ } + return tmpfp; + } + -- cgit