changeset 171:6c1e75bc4cac

properly add trailing mime boundary in all modes
author Carl Byington <carl@five-ten-sg.com>
date Sun, 29 Mar 2009 08:51:13 -0700
parents 0e1e048716e4
children 6954d315aaa8
files ChangeLog src/libpst.c src/readpst.c
diffstat 3 files changed, 3 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Sun Mar 22 14:34:26 2009 -0700
+++ b/ChangeLog	Sun Mar 29 08:51:13 2009 -0700
@@ -3,6 +3,7 @@
     * fix bug where we failed to pickup the last extended attribute.
     * patch from Emmanuel Andry to fix potential security bug in
       pst2dii with printf(err).
+    * properly add trailing mime boundary in all modes.	
 
 LibPST 0.6.34 (2009-03-19)
 ===============================
--- a/src/libpst.c	Sun Mar 22 14:34:26 2009 -0700
+++ b/src/libpst.c	Sun Mar 29 08:51:13 2009 -0700
@@ -628,7 +628,7 @@
             // add it to the list
             pst_x_attrib_ll *p_sh  = p_head;
             pst_x_attrib_ll *p_sh2 = NULL;
-            while (p_sh && ptr->map > p_sh->map) {
+            while (p_sh && (ptr->map > p_sh->map)) {
                 p_sh2 = p_sh;
                 p_sh  = p_sh->next;
             }
--- a/src/readpst.c	Sun Mar 22 14:34:26 2009 -0700
+++ b/src/readpst.c	Sun Mar 29 08:51:13 2009 -0700
@@ -1367,12 +1367,7 @@
         }
     }
 
-    // end of this mail message
-    if (mode != MODE_SEPARATE) { /* do not add a boundary after the last attachment for mode_MH */
-        DEBUG_EMAIL(("Writing buffer between emails\n"));
-        fprintf(f_output, "\n--%s--\n", boundary);
-        fprintf(f_output, "\n\n");
-    }
+    fprintf(f_output, "\n--%s--\n\n\n", boundary);
     DEBUG_RET();
 }