[git commit branch/1_29_stable] sendmail: fix parsing of addresses in angle brackets
Denys Vlasenko
vda.linux at googlemail.com
Sun Jul 15 12:52:21 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=6673497d3b4e6d88453b5aa6db50409a44db2539
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/1_29_stable
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 at dinapo.li>
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
mailutils/sendmail.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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';
More information about the busybox-cvs
mailing list