From: Raffaello D. Di Napoli Date: Tue, 26 Jun 2018 23:18:02 +0000 (-0400) Subject: sendmail: fix parsing of addresses in angle brackets X-Git-Tag: 1_30_0~546 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=6f09785b7e4a6cc7a9ede623d51aa8f6dc5e9a03;p=oweals%2Fbusybox.git 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 Signed-off-by: Denys Vlasenko --- 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';