upstream: http://seclists.org/oss-sec/2014/q4/1066
>From e34e2ac67b80497080ebecccec40c3b61456167d Mon Sep 17 00:00:00 2001
From: Florian Weimer <fweimer () redhat com>
Date: Mon, 17 Nov 2014 11:14:06 +0100
Subject: [PATCH 2/4] unpack: Disable option processing for email addresses
3 files changed, 8 insertions(+), 4 deletions(-)
diff --git a/extern.h b/extern.h
index 6b85ba0..8873fe8 100644
@@ -396,7 +396,7 @@ struct name *outof(struct name *names, FILE *fo, struct header *hp);
int is_fileaddr(char *name);
struct name *usermap(struct name *names);
struct name *cat(struct name *n1, struct name *n2);
-char **unpack(struct name *np);
+char **unpack(struct name *smopts, struct name *np);
struct name *elide(struct name *names);
int count(struct name *np);
struct name *delete_alternates(struct name *np);
diff --git a/names.c b/names.c
index c69560f..45bbaed 100644
@@ -549,7 +549,7 @@ cat(struct name *n1, struct name *n2)
* Return an error if the name list won't fit.
+unpack(struct name *smopts, struct name *np)
@@ -564,7 +564,7 @@ unpack(struct name *np)
* the terminating 0 pointer. Additional spots may be needed
* to pass along -f to the host mailer.
+ extra = 3 + count(smopts);
metoo = value("metoo") != NULL;
@@ -581,6 +581,10 @@ unpack(struct name *np)
+ for (; smopts != NULL; smopts = smopts->n_flink)
+ if ((smopts->n_type & GDEL) == 0)
+ *ap++ = smopts->n_name;
for (; n != NULL; n = n->n_flink)
if ((n->n_type & GDEL) == 0)
diff --git a/sendout.c b/sendout.c
index 7b7f2eb..c52f15d 100644