Mercurial > libpst
diff src/readpst.c @ 278:06e723720db0
ignore internet headers that don't seem to be real rfc822 headers
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sun, 22 May 2011 15:23:04 -0700 |
parents | 86078d0c2e9c |
children | 8c2c7d8d7518 |
line wrap: on
line diff
--- a/src/readpst.c Sun May 22 15:06:08 2011 -0700 +++ b/src/readpst.c Sun May 22 15:23:04 2011 -0700 @@ -1089,13 +1089,18 @@ { // headers are sometimes really bogus - they seem to be fragments of the // message body, so we only use them if they seem to be real rfc822 headers. - if ((strncasecmp(header, "Return-Path: ", 13) == 0) || - (strncasecmp(header, "Received: ", 10) == 0) || - (strncasecmp(header, "From: ", 6) == 0)) { + if (header) { + if ((strncasecmp(header, "Return-Path: ", 13) == 0) || + (strncasecmp(header, "Received: ", 10) == 0) || + (strncasecmp(header, "From: ", 6) == 0)) { + return 1; + } + else { + DEBUG_INFO(("Ignore bogus headers = \n%s\n", header)); + return 0; + } } - else { - DEBUG_INFO(("Ignore bogus headers = \n%s\n", header)); - } + else return 0; }