X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/d7d7b7b91dd75cec636fc144da7e27eed860f971..261dc43e32f6039781ca92535e56f5caaa68b809:/src/src/header.c diff --git a/src/src/header.c b/src/src/header.c index 48f21e204..1b6bf56d1 100644 --- a/src/src/header.c +++ b/src/src/header.c @@ -1,10 +1,10 @@ -/* $Cambridge: exim/src/src/header.c,v 1.5 2006/02/07 11:19:00 ph10 Exp $ */ +/* $Cambridge: exim/src/src/header.c,v 1.8 2009/11/16 19:50:37 nm4 Exp $ */ /************************************************* * Exim - an Internet mail transport agent * *************************************************/ -/* Copyright (c) University of Cambridge 1995 - 2006 */ +/* Copyright (c) University of Cambridge 1995 - 2009 */ /* See the file NOTICE for conditions of use and distribution. */ @@ -118,7 +118,14 @@ if (name == NULL) else { hptr = &header_list; - h = header_list; + + /* header_list->text can be NULL if we get here between when the new + received header is allocated and when it is acutally filled in. We want + that header to be first, so skip it for now. */ + + if (header_list->text == NULL) + hptr = &header_list->next; + h = *hptr; } }