X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fheader.c;h=cf7a81296f74c2c05a3266cfea5f131567f5393c;hb=12b7f811de4a540d0724585aecfa33b5881e2a30;hp=a6c44fac82d9b383b3881a36a3ada5b79f2a361a;hpb=f3ebb786e451da973560f1c9d8cdb151d25108b5;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/header.c b/src/src/header.c index a6c44fac8..cf7a81296 100644 --- a/src/src/header.c +++ b/src/src/header.c @@ -3,6 +3,7 @@ *************************************************/ /* Copyright (c) University of Cambridge 1995 - 2016 */ +/* Copyright (c) The Exim Maintainers 2020 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -321,9 +322,8 @@ while (bot < top) if (c == 0) { - uschar *s = text + mid->len; - while (isspace(*s)) s++; - if (*s == ':') + uschar * s = text + mid->len; + if (Uskip_whitespace(&s) == ':') return (!is_resent || mid->allow_resent)? mid->htype : htype_other; c = 1; } @@ -412,14 +412,13 @@ for (header_line * h = header_list; !yield && h; h = h->next) /* If there is some kind of syntax error, just give up on this header line. */ - if (next == NULL) break; + if (!next) break; /* Otherwise, test for the pattern; a non-regex must be an exact match */ - yield = (re == NULL)? - (strcmpic(next, pattern) == 0) - : - (pcre_exec(re, NULL, CS next, Ustrlen(next), 0, PCRE_EOPT, NULL, 0) + yield = !re + ? (strcmpic(next, pattern) == 0) + : (pcre_exec(re, NULL, CS next, Ustrlen(next), 0, PCRE_EOPT, NULL, 0) >= 0); } }