changeset 340:0f3185217313

Daniel Gryniewicz found buffer overrun in LIST_COPY_TIME
author Carl Byington <carl@five-ten-sg.com>
date Fri, 27 Dec 2013 08:27:47 -0800
parents 76e8180cdd0c
children c638905665bc
files AUTHORS ChangeLog NEWS configure.in libpst.spec.in src/libpst.c xml/libpst.in
diffstat 7 files changed, 20 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/AUTHORS	Sun Sep 22 18:02:00 2013 -0700
+++ b/AUTHORS	Fri Dec 27 08:27:47 2013 -0800
@@ -36,6 +36,7 @@
     Leo 'costela' Antunes <costela@debian.org>
     Svante Signell <svante.signell@telia.com>
     Dominique Leuenberger a.k.a. Dimstar <dimstar@opensuse.org>
+    Daniel Gryniewicz <dang@linuxbox.com>
 
 Testing team:
     Mac OSX - Michael Watson <mike@mikeandgayle.com>
--- a/ChangeLog	Sun Sep 22 18:02:00 2013 -0700
+++ b/ChangeLog	Fri Dec 27 08:27:47 2013 -0800
@@ -1,3 +1,7 @@
+LibPST 0.6.63 (2013-12-27)
+===============================
+    * Daniel Gryniewicz found buffer overrun in LIST_COPY_TIME
+
 LibPST 0.6.62 (2013-09-22)
 ===============================
     * 983596 - Old dependency filter breaks file coloring
--- a/NEWS	Sun Sep 22 18:02:00 2013 -0700
+++ b/NEWS	Fri Dec 27 08:27:47 2013 -0800
@@ -1,3 +1,4 @@
+0.6.63  2013-12-27 Daniel Gryniewicz found buffer overrun in LIST_COPY_TIME
 0.6.62  2013-09-22 983596 - Old dependency filter breaks file coloring
 0.6.61  2013-08-06 move documentation to unversioned directory
 0.6.60  2013-06-12 add AC_USE_SYSTEM_EXTENSIONS, add readpst -a option for attachment stripping
--- a/configure.in	Sun Sep 22 18:02:00 2013 -0700
+++ b/configure.in	Fri Dec 27 08:27:47 2013 -0800
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT(libpst,0.6.62,carl@five-ten-sg.com)
+AC_INIT(libpst,0.6.63,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([src/libpst.c])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
@@ -21,7 +21,7 @@
 #  6. libtool will build libpst.so.x.y.z where the SONAME is libpst.so.x
 #     and x=current-age, y=age, z=revision
 
-libpst_version_info='5:9:1'
+libpst_version_info='5:10:1'
 AC_SUBST(LIBPST_VERSION_INFO, [$libpst_version_info])
 libpst_so_major='4'
 AC_SUBST(LIBPST_SO_MAJOR, [$libpst_so_major])
@@ -49,6 +49,7 @@
 # 0.6.60    libpst.so.4     libpst.so.4.1.9
 # 0.6.61    libpst.so.4     libpst.so.4.1.9
 # 0.6.62    libpst.so.4     libpst.so.4.1.9
+# 0.6.63    libpst.so.4     libpst.so.4.1.10
 
 
 
--- a/libpst.spec.in	Sun Sep 22 18:02:00 2013 -0700
+++ b/libpst.spec.in	Fri Dec 27 08:27:47 2013 -0800
@@ -161,6 +161,9 @@
 
 
 %changelog
+* Fri Dec 27 2013 Carl Byington <carl@five-ten-sg.com> 0.6.63-1
+- Daniel Gryniewicz found buffer overrun in LIST_COPY_TIME
+
 * Sun Sep 22 2013 Carl Byington <carl@five-ten-sg.com> 0.6.62-1
 - 983596 - Old dependency filter breaks file coloring
 
--- a/src/libpst.c	Sun Sep 22 18:02:00 2013 -0700
+++ b/src/libpst.c	Fri Dec 27 08:27:47 2013 -0800
@@ -2068,11 +2068,13 @@
         DEBUG_WARN(("src not 0x40 for filetime dst\n"));                    \
         DEBUG_HEXDUMP(list->elements[x]->data, list->elements[x]->size);    \
     }                                                                       \
-    targ = (FILETIME*) pst_realloc(targ, sizeof(FILETIME));                 \
-    memcpy(targ, list->elements[x]->data, list->elements[x]->size);         \
-    LE32_CPU(targ->dwLowDateTime);                                          \
-    LE32_CPU(targ->dwHighDateTime);                                         \
-    DEBUG_INFO((label" - %s", pst_fileTimeToAscii(targ, time_buffer)));     \
+    else {                                                                  \
+        targ = (FILETIME*) pst_realloc(targ, sizeof(FILETIME));             \
+        memcpy(targ, list->elements[x]->data, min(sizeof(FILETIME), list->elements[x]->size)); \
+        LE32_CPU(targ->dwLowDateTime);                                      \
+        LE32_CPU(targ->dwHighDateTime);                                     \
+        DEBUG_INFO((label" - %s", pst_fileTimeToAscii(targ, time_buffer))); \
+    }                                                                       \
 }
 
 #define LIST_COPY_EMAIL_TIME(label, targ) {                     \
--- a/xml/libpst.in	Sun Sep 22 18:02:00 2013 -0700
+++ b/xml/libpst.in	Fri Dec 27 08:27:47 2013 -0800
@@ -26,7 +26,7 @@
         </para>
 
         <para>The <ulink
-        url="http://sourceforge.net/projects/libpff/">libpff</ulink> project
+        url="http://code.google.com/p/libpff/">libpff</ulink> project
         has some excellent documentation of the pst file format.
         </para>