X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Ftransport.c;h=8ac6f30a095303578d4a359878cdd5b7f4b0cf1e;hb=ae20c80970d513823f3d36e73ec9657bf4b0e197;hp=c14b60f4e8388007939fc831b8b9373e1024194f;hpb=806c3df997132e99f4abade6d00be18930695408;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/transport.c b/src/src/transport.c index c14b60f4e..8ac6f30a0 100644 --- a/src/src/transport.c +++ b/src/src/transport.c @@ -2,7 +2,7 @@ * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2015 */ +/* Copyright (c) University of Cambridge 1995 - 2016 */ /* See the file NOTICE for conditions of use and distribution. */ /* General functions concerned with transportation, and generic options for all @@ -655,7 +655,7 @@ for (h = header_list; h != NULL; h = h->next) if (h->type != htype_old) errno = ERRNO_CHHEADER_FAIL; return FALSE; } - len = Ustrlen(s); + len = s ? Ustrlen(s) : 0; if (strncmpic(h->text, s, len) != 0) continue; ss = h->text + len; while (*ss == ' ' || *ss == '\t') ss++; @@ -933,7 +933,8 @@ if ((options & topt_no_body) == 0) { nl_check_length = abs(nl_check_length); nl_partial_match = 0; - lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET); + if (lseek(deliver_datafile, SPOOL_DATA_START_OFFSET, SEEK_SET) < 0) + return FALSE; while ((len = read(deliver_datafile, deliver_in_buffer, DELIVER_IN_BUFFER_SIZE)) > 0) {