# HG changeset patch # User Carl Byington # Date 1203193595 28800 # Node ID 97b7706bdda24503ed08a36f7f41b4d5c3a76962 # Parent 7d5c637aaafba1f0a822dc615b0799faec07d888 Work around bogus 7c.b5 blocks in some messages that have been read. They appear to have attachments, but of some unknown format. Before the message was read, it did not have any attachments. Use autoscan to cleanup our autoconf system. Use autoconf to detect when we need to use our XGetopt files and other header files. More fields, including BCC. Fix missing LE32_CPU byte swapping for FILETIME types. diff -r 7d5c637aaafb -r 97b7706bdda2 ChangeLog --- a/ChangeLog Thu Feb 14 14:55:32 2008 -0800 +++ b/ChangeLog Sat Feb 16 12:26:35 2008 -0800 @@ -1,5 +1,8 @@ -LibPST 0.6.7 (2008-xx-xx) +LibPST 0.6.7 (2008-02-16) =============================== + * Work around bogus 7c.b5 blocks in some messages that have been + read. They appear to have attachments, but of some unknown format. + Before the message was read, it did not have any attachments. * Use autoscan to cleanup our autoconf system. * Use autoconf to detect when we need to use our XGetopt files and other header files. diff -r 7d5c637aaafb -r 97b7706bdda2 NEWS --- a/NEWS Thu Feb 14 14:55:32 2008 -0800 +++ b/NEWS Sat Feb 16 12:26:35 2008 -0800 @@ -1,3 +1,4 @@ +0.6.7 2008-02-16 Ignore unknown attachments on some read messages; autoconf cleanup. 0.6.6 2008-01-31 Code cleanup, switch from cvs to mercurial source control. 0.6.5 2008-01-22 Code cleanup, rpm group Applications/Productivity. 0.6.4 2008-01-19 More fixes for 64 bit format, merge changes from svn Alioth. diff -r 7d5c637aaafb -r 97b7706bdda2 package --- a/package Thu Feb 14 14:55:32 2008 -0800 +++ b/package Sat Feb 16 12:26:35 2008 -0800 @@ -10,7 +10,6 @@ web=/home/httpd/html/510sg/$NAME distlog=/tmp/distcheck repo=/usr/hg-repository/$NAME -exit # check for uncommitted changes a=$(hg status) diff -r 7d5c637aaafb -r 97b7706bdda2 regression/regression-tests.bash --- a/regression/regression-tests.bash Thu Feb 14 14:55:32 2008 -0800 +++ b/regression/regression-tests.bash Sat Feb 16 12:26:35 2008 -0800 @@ -2,7 +2,7 @@ val="valgrind --leak-check=full" -for i in {1..8}; do +for i in {1..10}; do rm -rf output$i mkdir output$i done @@ -26,7 +26,13 @@ $val ../src/readpst -cv -o output8 -d dumper big_mail.pst >out8.err 2>&1 ../src/readpstlog -f I dumper >big_mail.log -$val ../src/lspst -d dumper ams.pst >out9.err 2>&1 +$val ../src/readpst -cv -o output9 -d dumper Single2003-read.pst >out9.err 2>&1 + ../src/readpstlog -f I dumper >Single2003-read.log + +$val ../src/readpst -cv -o output10 -d dumper Single2003-unread.pst >out10.err 2>&1 + ../src/readpstlog -f I dumper >Single2003-unread.log + +$val ../src/lspst -d dumper ams.pst >out11.err 2>&1 ../src/readpstlog -f I dumper >ams.log rm -f dumper diff -r 7d5c637aaafb -r 97b7706bdda2 src/libpst.c --- a/src/libpst.c Thu Feb 14 14:55:32 2008 -0800 +++ b/src/libpst.c Sat Feb 16 12:26:35 2008 -0800 @@ -1171,10 +1171,11 @@ DEBUG_EMAIL(("ATTACHMENT processing attachment\n")); if ((list = pst_parse_block(pf, id_ptr->id, id2_head, NULL)) == NULL) { DEBUG_WARN(("ERROR error processing main attachment record\n")); - if (item) pst_freeItem(item); + //if (item) pst_freeItem(item); if (id2_head) pst_free_id2(id2_head); DEBUG_RET(); - return NULL; + //return NULL; + return item; } else { x = 0; diff -r 7d5c637aaafb -r 97b7706bdda2 xml/libpst.in --- a/xml/libpst.in Thu Feb 14 14:55:32 2008 -0800 +++ b/xml/libpst.in Sat Feb 16 12:26:35 2008 -0800 @@ -1494,7 +1494,7 @@ 002e Original Sensitivity 0036 Sensitivity 0037 Email Subject -0039 Date. This is likely to be the arrival date +0039 Client submit time / date sent 003b Outlook Address of Sender 003f Outlook structure describing the recipient 0040 Name of the Outlook recipient structure @@ -1526,10 +1526,21 @@ 0c1e Second sender access method (SMTP, EX) 0c1f Second Sender Address 0e01 Delete after submit -0e03 CC Address? +0e02 BCC Addresses +0e03 CC Addresses 0e04 SentTo Address 0e06 Date. -0e07 Flag - contains IsSeen value +0e07 Flag bits + 0x01 - Read + 0x02 - Unmodified + 0x04 - Submit + 0x08 - Unsent + 0x10 - Has Attachments + 0x20 - From Me + 0x40 - Associated + 0x80 - Resend + 0x100 - RN Pending + 0x200 - NRN Pending 0e08 Message Size 0e0a Sentmail EntryID 0e1f Compressed RTF in Sync @@ -1802,6 +1813,12 @@ and unused here. + We have seen cases where the descoffset in the b5 block is zero, and + the index2Offset in the 7c block is zero. This has been seen for + objects that seem to be attachments on messages that have been + read. Before the message was read, it did not have any attachments. + + Note the index2Offset above of 0x0080, which again is an index reference. In this case, it is an internal pointer reference, which needs to be right shifted by 4 bits to become 0x0008, which is then a byte offset to be added to