changeset 300:47abe56076da

embedded rfc822 messages might contain rtf encoded bodies
author Carl Byington <carl@five-ten-sg.com>
date Fri, 04 Nov 2011 14:09:50 -0700
parents 1ddc61fd6189
children 1d181966da22
files ChangeLog NEWS configure.in libpst.spec.in regression/regression-tests.bash src/readpst.c
diffstat 6 files changed, 24 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Aug 14 19:58:47 2011 -0700
+++ b/ChangeLog	Fri Nov 04 14:09:50 2011 -0700
@@ -1,3 +1,7 @@
+LibPST 0.6.54 (2011-11-04)
+===============================
+    * embedded rfc822 messages might contain rtf encoded bodies
+
 LibPST 0.6.53 (2011-07-10)
 ===============================
     * add Status: header in output
--- a/NEWS	Sun Aug 14 19:58:47 2011 -0700
+++ b/NEWS	Fri Nov 04 14:09:50 2011 -0700
@@ -1,3 +1,4 @@
+0.6.54  2011-11-04 embedded rfc822 messages might contain rtf encoded bodies
 0.6.53  2011-07-10 allow fork for parallel processing of individual email folders in separate mode
 0.6.52  2011-05-22 fix dangling freed pointer; allow broken outlook internet header field
 0.6.51  2011-04-17 fix for buffer overrun; attachment size fetched twice
--- a/configure.in	Sun Aug 14 19:58:47 2011 -0700
+++ b/configure.in	Fri Nov 04 14:09:50 2011 -0700
@@ -1,5 +1,5 @@
 AC_PREREQ(2.59)
-AC_INIT(libpst,0.6.53,carl@five-ten-sg.com)
+AC_INIT(libpst,0.6.54,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([src/libpst.c])
 AC_CONFIG_HEADER([config.h])
 AM_INIT_AUTOMAKE
@@ -38,6 +38,7 @@
 # 0.6.51    libpst.so.4     libpst.so.4.1.1
 # 0.6.52    libpst.so.4     libpst.so.4.1.2
 # 0.6.53    libpst.so.4     libpst.so.4.1.3
+# 0.6.54    libpst.so.4     libpst.so.4.1.4
 
 
 
--- a/libpst.spec.in	Sun Aug 14 19:58:47 2011 -0700
+++ b/libpst.spec.in	Fri Nov 04 14:09:50 2011 -0700
@@ -147,6 +147,9 @@
 
 
 %changelog
+* Fri Nov 04 2011 Carl Byington <carl@five-ten-sg.com> - 0.6.54-1
+- embedded rfc822 messages might contain rtf encoded bodies
+
 * Sun Jul 10 2011 Carl Byington <carl@five-ten-sg.com> - 0.6.53-1
 - add Status: header in output
 - allow fork for parallel processing of individual email folders
--- a/regression/regression-tests.bash	Sun Aug 14 19:58:47 2011 -0700
+++ b/regression/regression-tests.bash	Fri Nov 04 14:09:50 2011 -0700
@@ -71,6 +71,7 @@
             #$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
+            echo $val ../src/readpst $jobs      -r -S -D -cv -o output$n -d $ba.log $fn
             $val ../src/readpst $jobs      -r -S -D -cv -o output$n -d $ba.log $fn >$ba.err 2>&1
 
             ## testing idblock
@@ -118,17 +119,18 @@
 #$func  15 hourig1.pst
 #$func  16 test-mac.pst
 #$func  18 spam.pst
-$func  19 rendgen.pst           # single email appointment
-$func  20 rendgen2.pst          # email appointment with no termination date
-$func  21 rendgen3.pst          # mime signed email
-$func  22 rendgen4.pst          # appointment test cases
-$func  23 rendgen5.pst          # appointment test cases
+#$func  19 rendgen.pst           # single email appointment
+#$func  20 rendgen2.pst          # email appointment with no termination date
+#$func  21 rendgen3.pst          # mime signed email
+#$func  22 rendgen4.pst          # appointment test cases
+#$func  23 rendgen5.pst          # appointment test cases
 #$func  24 paul.sheer.pst        # embedded rfc822 attachment
 #$func  25 jerry.pst             # non ascii subject lines
 #$func  26 phill.bertolus.pst    # possible segfault in forked process, cannot reproduce
-#$func  27 justin.phelps.pst     # segfault?
-$func  27 kaiser.pst            # appointments with other character sets
-
+#$func  27 kaiser.pst            # appointments with other character sets
+#$func  28 pstsample.pst         # character set issue
+#$func  29 pstsample2.pst        # embedded image in rtf data
+$func  30 pstsample3.pst        # exports of rtf and html
 
 [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 '
 
--- a/src/readpst.c	Sun Aug 14 19:58:47 2011 -0700
+++ b/src/readpst.c	Fri Nov 04 14:09:50 2011 -0700
@@ -44,7 +44,7 @@
 char*     my_stristr(char *haystack, char *needle);
 void      check_filename(char *fname);
 void      write_separate_attachment(char f_name[], pst_item_attach* attach, int attach_num, pst_file* pst);
-void      write_embedded_message(FILE* f_output, pst_item_attach* attach, char *boundary, pst_file* pf, char** extra_mime_headers);
+void      write_embedded_message(FILE* f_output, pst_item_attach* attach, char *boundary, pst_file* pf, int save_rtf, char** extra_mime_headers);
 void      write_inline_attachment(FILE* f_output, pst_item_attach* attach, char *boundary, pst_file* pst);
 int       valid_headers(char *header);
 void      header_has_field(char *header, char *field, int *flag);
@@ -606,7 +606,6 @@
     DEBUG_ENT("main");
 
     if (output_mode != OUTPUT_QUIET) printf("Opening PST file and indexes...\n");
-
     RET_DERROR(pst_open(&pstfile, fname, default_charset), 1, ("Error opening File\n"));
     RET_DERROR(pst_load_index(&pstfile), 2, ("Index Error\n"));
 
@@ -1050,7 +1049,7 @@
 }
 
 
-void write_embedded_message(FILE* f_output, pst_item_attach* attach, char *boundary, pst_file* pf, char** extra_mime_headers)
+void write_embedded_message(FILE* f_output, pst_item_attach* attach, char *boundary, pst_file* pf, int save_rtf, char** extra_mime_headers)
 {
     pst_index_ll *ptr;
     DEBUG_ENT("write_embedded_message");
@@ -1083,7 +1082,7 @@
         } else {
             fprintf(f_output, "\n--%s\n", boundary);
             fprintf(f_output, "Content-Type: %s\n\n", attach->mimetype.str);
-            write_normal_email(f_output, "", item, MODE_NORMAL, 0, pf, 0, extra_mime_headers);
+            write_normal_email(f_output, "", item, MODE_NORMAL, 0, pf, save_rtf, extra_mime_headers);
         }
         pst_freeItem(item);
     }
@@ -1734,7 +1733,7 @@
                 attach->mimetype.str = strdup(RFC822);
                 attach->mimetype.is_utf8 = 1;
                 find_rfc822_headers(extra_mime_headers);
-                write_embedded_message(f_output, attach, boundary, pst, extra_mime_headers);
+                write_embedded_message(f_output, attach, boundary, pst, save_rtf, extra_mime_headers);
             }
             else if (attach->data.data || attach->i_id) {
                 if (mode == MODE_SEPARATE && !mode_MH)