Hello community,
here is the log from the commit of package snapper for openSUSE:Factory checked in at 2014-09-28 19:55:30
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/snapper (Old)
and /work/SRC/openSUSE:Factory/.snapper.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "snapper"
Changes:
--------
--- /work/SRC/openSUSE:Factory/snapper/snapper.changes 2014-09-17 21:24:56.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.snapper.new/snapper.changes 2014-09-28 19:55:35.000000000 +0200
@@ -1,0 +2,5 @@
+Wed Sep 24 15:29:51 CEST 2014 - aschnell@suse.de
+
+- resolved some code issues found by code analysis
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ snapper-0.2.4.tar.bz2 ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.4/snapper/AppUtil.cc new/snapper-0.2.4/snapper/AppUtil.cc
--- old/snapper-0.2.4/snapper/AppUtil.cc 2014-08-01 10:12:17.000000000 +0200
+++ new/snapper-0.2.4/snapper/AppUtil.cc 2014-09-23 17:52:24.000000000 +0200
@@ -35,6 +35,7 @@
#include
#include
#include
+#include
#include "snapper/Log.h"
#include "snapper/AppUtil.h"
@@ -93,7 +94,7 @@
while (true)
{
// use small value for count to make function better interruptible
- ssize_t r1 = sendfile(dest_fd, src_fd, NULL, 0xffff);
+ ssize_t r1 = sendfile(dest_fd, src_fd, NULL, 0x10000);
if (r1 == 0)
return true;
@@ -371,6 +372,7 @@
std::ostream& operator<<(std::ostream& s, const StopWatch& sw)
{
+ boost::io::ios_all_saver ias(s);
return s << fixed << sw.read() << "s";
}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/snapper-0.2.4/snapper/FileUtils.cc new/snapper-0.2.4/snapper/FileUtils.cc
--- old/snapper-0.2.4/snapper/FileUtils.cc 2014-06-04 12:23:25.000000000 +0200
+++ new/snapper-0.2.4/snapper/FileUtils.cc 2014-09-24 16:44:25.000000000 +0200
@@ -61,7 +61,12 @@
}
struct stat buf;
- fstat(dirfd, &buf);
+ if (fstat(dirfd, &buf) != 0)
+ {
+ y2err("fstat failed path:" << base_path << " error:" << stringerror(errno));
+ throw IOErrorException();
+ }
+
if (!S_ISDIR(buf.st_mode))
{
y2err("not a directory path:" << base_path);
@@ -86,7 +91,12 @@
}
struct stat buf;
- fstat(dirfd, &buf);
+ if (fstat(dirfd, &buf) != 0)
+ {
+ y2err("fstat failed path:" << base_path << " error:" << stringerror(errno));
+ throw IOErrorException();
+ }
+
if (!S_ISDIR(buf.st_mode))
{
y2err("not a directory path:" << dir.fullname(name));
@@ -405,6 +415,7 @@
name = string(&t[strlen(t) - name.size()]);
+ free(t);
return true;
}
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org