summaryrefslogtreecommitdiff
path: root/mailutils
diff options
context:
space:
mode:
authorRaffaello D. Di Napoli2018-06-26 19:18:02 -0400
committerDenys Vlasenko2018-07-15 14:52:21 +0200
commit6673497d3b4e6d88453b5aa6db50409a44db2539 (patch)
tree552a27afa3b79446fbad74758b5091c0b958729e /mailutils
parent7236b6d717409eb156a19af577b964c8c393dbb2 (diff)
downloadbusybox-6673497d3b4e6d88453b5aa6db50409a44db2539.zip
busybox-6673497d3b4e6d88453b5aa6db50409a44db2539.tar.gz
sendmail: fix parsing of addresses in angle brackets
Pointer e needs to be wound back in order to overwrite '>' with '\0'. Regression introduced in 20077c1429 Signed-off-by: Raffaello D. Di Napoli <rafdev@dinapo.li> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'mailutils')
-rw-r--r--mailutils/sendmail.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c
index 4ca91fa..0170f28 100644
--- a/mailutils/sendmail.c
+++ b/mailutils/sendmail.c
@@ -173,7 +173,7 @@ static char *angle_address(char *str)
char *s, *e;
e = trim(str);
- if (e != str && e[-1] == '>') {
+ if (e != str && *--e == '>') {
s = strrchr(str, '<');
if (s) {
*e = '\0';