changeset 344:aedcf979f439

fix unchecked errors found by cppcheck
author Carl Byington <carl@five-ten-sg.com>
date Mon, 09 Mar 2015 08:49:47 -0700
parents 2079fc3460c2
children a8577226f7a9
files Makefile.coverity configure.in libpst.spec.in regression/regression-tests.bash src/pst2ldif.cpp src/readpst.c
diffstat 6 files changed, 24 insertions(+), 23 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.coverity	Fri Dec 27 09:01:31 2013 -0800
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-default: all
-
-all:
-	rm -rf emit output
-	export PATH=$(PATH):$(PWD)/coverity/prevent-linux-2.4.6/bin;	\
-		cov-configure -co /usr/bin/gcc;								\
-		./configure && make clean;									\
-		cov-build -e emit -o output make
-	mv README README.save
-	mv README.COVERITY README
-	tar czvf libpst.tgz README emit output
-	mv README README.COVERITY
-	mv README.save README
-	rm -rf emit output
-	echo mv libpst.tgz /home/httpd/html/510sg
-	echo fixup-510 ns1 --dry-run
-
--- a/configure.in	Fri Dec 27 09:01:31 2013 -0800
+++ b/configure.in	Mon Mar 09 08:49:47 2015 -0700
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT(libpst,0.6.63,carl@five-ten-sg.com)
+AC_INIT(libpst,0.6.64,carl@five-ten-sg.com)
 AC_CONFIG_SRCDIR([src/libpst.c])
 AC_CONFIG_HEADER([config.h])
 AC_CONFIG_MACRO_DIR([m4])
--- a/libpst.spec.in	Fri Dec 27 09:01:31 2013 -0800
+++ b/libpst.spec.in	Mon Mar 09 08:49:47 2015 -0700
@@ -40,8 +40,7 @@
 Requires:           %{name}-libs = %{version}-%{release}
 
 %if 0%{?fedora} >= 20
-%global __provides_exclude_from
-%{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$
+%global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{python_sitearch}/_.*\.so$
 %else
 %{?filter_setup:
 %filter_provides_in %{python_sitearch}/_.*\.so$
@@ -161,6 +160,22 @@
 
 
 %changelog
+* Mon Mar 09 2015 Carl Byington <carl@five-ten-sg.com> 0.6.64-1
+- fix line wrap on python provides_exclude_from
+- fix unchecked errors found by cppcheck
+
+* Mon Jan 26 2015 Petr Machata <pmachata@redhat.com> - 0.6.63-5
+- Rebuild for boost 1.57.0
+
+* Sun Aug 17 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.63-4
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
+
+* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.63-3
+- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
+
+* Fri May 23 2014 David Tardon <dtardon@redhat.com> - 0.6.63-2
+- rebuild for boost 1.55.0
+
 * Fri Dec 27 2013 Carl Byington <carl@five-ten-sg.com> 0.6.63-1
 - Daniel Gryniewicz found buffer overrun in LIST_COPY_TIME
 
--- a/regression/regression-tests.bash	Fri Dec 27 09:01:31 2013 -0800
+++ b/regression/regression-tests.bash	Mon Mar 09 08:49:47 2015 -0700
@@ -112,7 +112,7 @@
 #$func   2 sample_64.pst
 #$func   3 test.pst
 #$func   4 big_mail.pst
-#$func   5 mbmg.archive.pst
+$func   5 mbmg.archive.pst
 #$func   6 Single2003-read.pst
 #$func   7 Single2003-unread.pst
 #$func   8 ol2k3high.pst
@@ -137,7 +137,7 @@
 #$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
-$func  31 Journal_Archives_08_29_2010.pst
+#$func  31 Journal_Archives_08_29_2010.pst
 
 [ -n "$val" ] && grep 'lost:' *err | grep -v 'lost: 0 '
 
--- a/src/pst2ldif.cpp	Fri Dec 27 09:01:31 2013 -0800
+++ b/src/pst2ldif.cpp	Mon Mar 09 08:49:47 2015 -0700
@@ -463,7 +463,9 @@
         else {
             if (i > (len-5)) {
                 len += 256;
-                address = (char *)realloc(address, len);
+                char *addr = (char *)realloc(address, len);  // cppcheck found unchecked error
+                if (!addr) exit(3);
+                address = addr;
             }
             if (newline_flag) {
                 address[i++] = '$';
--- a/src/readpst.c	Fri Dec 27 09:01:31 2013 -0800
+++ b/src/readpst.c	Mon Mar 09 08:49:47 2015 -0700
@@ -935,6 +935,7 @@
                         }
                     }
             }
+            closedir(sdir);     // cppcheck detected leak
         }
 #endif
     }