From b78df8ed426ca7bf85eaca0e0f3de54fbca7196f Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Fri, 7 Jun 2019 09:52:09 +0100 Subject: [PATCH] wmail: allow for multiple white-space characters between name and address. --- wmail/src/wmail.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/wmail/src/wmail.c b/wmail/src/wmail.c index eefc1b9..01131c7 100644 --- a/wmail/src/wmail.c +++ b/wmail/src/wmail.c @@ -951,9 +951,10 @@ static char *ParseFromField( char *buf ) state = STATE_QUOTED_FULLNAME; continue; case '<': - if( fullNameLen > 0 && - fullName[ fullNameLen - 1 ] == ' ' ) - fullName[ --fullNameLen ] = '\0'; + while( fullNameLen > 0 && + isspace( fullName[ fullNameLen - 1 ] )) + fullNameLen--; + fullName[ fullNameLen ] = '\0'; state = STATE_ADDRESS; continue; case '@':