aboutsummaryrefslogtreecommitdiff
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
parent2cd81698ee6f272202299058c134495bc8984c5f (diff)
downloadbusybox-w32-6f09785b7e4a6cc7a9ede623d51aa8f6dc5e9a03.tar.gz
busybox-w32-6f09785b7e4a6cc7a9ede623d51aa8f6dc5e9a03.tar.bz2
busybox-w32-6f09785b7e4a6cc7a9ede623d51aa8f6dc5e9a03.zip
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>
-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)
173 char *s, *e; 173 char *s, *e;
174 174
175 e = trim(str); 175 e = trim(str);
176 if (e != str && e[-1] == '>') { 176 if (e != str && *--e == '>') {
177 s = strrchr(str, '<'); 177 s = strrchr(str, '<');
178 if (s) { 178 if (s) {
179 *e = '\0'; 179 *e = '\0';