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>
This commit is contained in:
Raffaello D. Di Napoli 2018-06-26 19:18:02 -04:00 committed by Denys Vlasenko
parent 2cd81698ee
commit 6f09785b7e

View File

@ -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';