Mercurial > libpst
changeset 252:4573b536177f
fix for broken internet headers from Outlook
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 24 Jul 2010 12:07:56 -0700 |
parents | 00aaa548289b |
children | 115b871c61a1 |
files | ChangeLog NEWS configure.in libpst.spec.in regression/regression-tests.bash src/getidblock.c src/libpst.c |
diffstat | 7 files changed, 35 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jul 07 16:29:23 2010 -0700 +++ b/ChangeLog Sat Jul 24 12:07:56 2010 -0700 @@ -1,3 +1,7 @@ +LibPST 0.6.48 (2010-07-24) +=============================== + * fix for broken internet headers from Outlook. + LibPST 0.6.47 (2010-05-07) =============================== * patches from Kenneth Berland for solaris.
--- a/NEWS Wed Jul 07 16:29:23 2010 -0700 +++ b/NEWS Sat Jul 24 12:07:56 2010 -0700 @@ -1,4 +1,5 @@ -0.6.47 2010-05-06 patches from Kenneth Berland for solaris +0.6.48 2010-07-24 fix for broken internet headers from Outlook +0.6.47 2010-05-07 patches from Kenneth Berland for solaris 0.6.46 2010-02-13 fixes for fedora 13 change in implicit dso linking semantics 0.6.45 2009-11-18 patch from Hugo DesRosiers to export categories and notes into vcards 0.6.44 2009-09-20 patch from Lee Ayres to add file name extensions in separate mode
--- a/configure.in Wed Jul 07 16:29:23 2010 -0700 +++ b/configure.in Sat Jul 24 12:07:56 2010 -0700 @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT(libpst,0.6.47,carl@five-ten-sg.com) +AC_INIT(libpst,0.6.48,carl@five-ten-sg.com) AC_CONFIG_SRCDIR([src/libpst.c]) AC_CONFIG_HEADER([config.h]) AM_INIT_AUTOMAKE
--- a/libpst.spec.in Wed Jul 07 16:29:23 2010 -0700 +++ b/libpst.spec.in Sat Jul 24 12:07:56 2010 -0700 @@ -1,7 +1,7 @@ Summary: Utilities to convert Outlook .pst files to other formats Name: @PACKAGE@ Version: @VERSION@ -Release: 2%{?dist} +Release: 1%{?dist} License: GPLv2+ Group: Applications/Productivity Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz @@ -147,6 +147,12 @@ %changelog +* Sat Jul 24 2010 Carl Byington <carl@five-ten-sg.com> - 0.6.48-1 +- fix for broken internet headers from Outlook + +* Wed Jul 21 2010 David Malcolm <dmalcolm@redhat.com> - 0.6.47-3 +- Rebuilt for https://fedoraproject.org/wiki/Features/Python_2.7/MassRebuild + * Wed Jul 07 2010 Carl Byington <carl@five-ten-sg.com> - 0.6.47-2 - Subpackage Licensing, add COPYING to -libs. - patches from Kenneth Berland for solaris
--- a/regression/regression-tests.bash Wed Jul 07 16:29:23 2010 -0700 +++ b/regression/regression-tests.bash Sat Jul 24 12:07:56 2010 -0700 @@ -62,13 +62,13 @@ $val ../src/readpst $jobs -te -r -cv -o output$n $fn >$ba.err 2>&1 else ## only email and include deleted items, have a deleted items folder with multiple item types - #$val ../src/readpst $jobs -te -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + $val ../src/readpst $jobs -te -r -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 ## normal recursive dump #$val ../src/readpst $jobs -r -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 ## separate mode with filename extensions - $val ../src/readpst $jobs -r -e -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 + #$val ../src/readpst $jobs -r -e -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 ## separate mode where we decode all attachments to binary files #$val ../src/readpst $jobs -r -S -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1 @@ -101,8 +101,6 @@ [ "$2" == "reg" ] && regression="yes" [ "$regression" == "yes" ] && val="" -$func 24 paul.sheer.pst # embedded rfc822 attachment -exit $func 1 ams.pst $func 2 sample_64.pst $func 3 test.pst
--- a/src/getidblock.c Wed Jul 07 16:29:23 2010 -0700 +++ b/src/getidblock.c Sat Jul 24 12:07:56 2010 -0700 @@ -31,7 +31,7 @@ DIE(("Error loading block\n")); } - DEBUG_INFO(("Printing block id %#"PRIx64", size %#"PRIx64"\n", i_id, (uint64_t)readSize)); + DEBUG_INFO(("Printing block i_id %#"PRIx64", size %#"PRIx64"\n", i_id, (uint64_t)readSize)); if (binary) { if (fwrite(buf, 1, readSize, stdout) != 0) { DIE(("Error occured during writing of buf to stdout\n")); @@ -63,14 +63,18 @@ } -void dump_desc(pst_desc_tree *ptr); -void dump_desc(pst_desc_tree *ptr) +void dump_desc(pst_desc_tree *ptr, pst_desc_tree *parent); +void dump_desc(pst_desc_tree *ptr, pst_desc_tree *parent) { while (ptr) { - DEBUG_INFO(("\n\n\nLooking at block desc id %#"PRIx64"\n", ptr->d_id)); + uint64_t parent_d_id = (parent) ? parent->d_id : 0; + printf("Descriptor block d_id %#"PRIx64" parent d_id %#"PRIx64" children %i desc.i_id=%#"PRIx64", assoc tree.i_id=%#"PRIx64"\n", + ptr->d_id, parent_d_id, ptr->no_child, + (ptr->desc ? ptr->desc->i_id : (uint64_t)0), + (ptr->assoc_tree ? ptr->assoc_tree->i_id : (uint64_t)0)); if (ptr->desc && ptr->desc->i_id) dumper(ptr->desc->i_id); if (ptr->assoc_tree && ptr->assoc_tree->i_id) dumper(ptr->assoc_tree->i_id); - if (ptr->child) dump_desc(ptr->child); + if (ptr->child) dump_desc(ptr->child, ptr); ptr = ptr->next; } } @@ -131,7 +135,7 @@ dumper(ptr->i_id); ptr = ptr->next; } - dump_desc(pstfile.d_head); + dump_desc(pstfile.d_head, NULL); } if (pst_close(&pstfile) != 0) {
--- a/src/libpst.c Wed Jul 07 16:29:23 2010 -0700 +++ b/src/libpst.c Sat Jul 24 12:07:56 2010 -0700 @@ -2370,6 +2370,15 @@ break; case 0x007D: // PR_TRANSPORT_MESSAGE_HEADERS Internet Header LIST_COPY_EMAIL_STR("Internet Header", item->email->header); + if (item->email->header.str && item->email->header.str[0] == '\r') { + // broken outlook internet headers + const char* fix = "Received: header broken by outlook fixup by libpst"; + char *str = pst_malloc(strlen(fix) + strlen(item->email->header.str) + 1); + strcpy(str, fix); + strcat(str, item->email->header.str); + free(item->email->header.str); + item->email->header.str = str; + } break; case 0x0C04: // PR_NDR_REASON_CODE LIST_COPY_EMAIL_INT32("NDR reason code", item->email->ndr_reason_code);