aboutsummaryrefslogtreecommitdiff
path: root/mailutils
diff options
context:
space:
mode:
authorRaffaello D. Di Napoli <rafdev@dinapo.li>2018-06-26 19:18:02 -0400
committerDenys Vlasenko <vda.linux@googlemail.com>2018-07-04 16:18:35 +0200
commit6f09785b7e4a6cc7a9ede623d51aa8f6dc5e9a03 (patch)
treeb65c46ce5e2e20e365d73326fde78954b8862b5e /mailutils
parent2cd81698ee6f272202299058c134495bc8984c5f (diff)
downloadbusybox-6f09785b7e4a6cc7a9ede623d51aa8f6dc5e9a03.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 4ca91fad8..0170f2870 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';