Hello community, here is the log from the commit of package health-check for openSUSE:Factory checked in at 2019-12-18 14:46:19 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/health-check (Old) and /work/SRC/openSUSE:Factory/.health-check.new.4691 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "health-check" Wed Dec 18 14:46:19 2019 rev:7 rq:757631 version:0.03.04 Changes: -------- --- /work/SRC/openSUSE:Factory/health-check/health-check.changes 2019-06-17 10:34:24.757232026 +0200 +++ /work/SRC/openSUSE:Factory/.health-check.new.4691/health-check.changes 2019-12-18 14:48:42.737949427 +0100 @@ -1,0 +2,15 @@ +Tue Dec 17 19:35:34 UTC 2019 - Martin Hauke <[email protected]> + +- Update to version 0.03.04 + * syscall: handle a null return from localtime + * set *inode to zero to clear up a static analysis false warning + * ignore return from proc_pids_add_proc + * net: pass size of link string in net_get_inode_by_path + +------------------------------------------------------------------- +Tue Aug 27 09:47:44 UTC 2019 - Martin Hauke <[email protected]> + +- Update to version 0.03.03 + * No functional changes + +------------------------------------------------------------------- Old: ---- health-check-0.03.01.tar.gz New: ---- health-check-0.03.04.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ health-check.spec ++++++ --- /var/tmp/diff_new_pack.blLWNi/_old 2019-12-18 14:48:43.045949568 +0100 +++ /var/tmp/diff_new_pack.blLWNi/_new 2019-12-18 14:48:43.045949568 +0100 @@ -18,7 +18,7 @@ Name: health-check -Version: 0.03.01 +Version: 0.03.04 Release: 0 Summary: Process monitoring tool License: GPL-2.0-or-later ++++++ health-check-0.03.01.tar.gz -> health-check-0.03.04.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.01/.travis.yml new/health-check-0.03.04/.travis.yml --- old/health-check-0.03.01/.travis.yml 2019-06-14 15:18:49.000000000 +0200 +++ new/health-check-0.03.04/.travis.yml 2019-12-16 14:01:05.000000000 +0100 @@ -1,4 +1,4 @@ -dist: trusty +dist: bionic sudo: required matrix: @@ -10,6 +10,7 @@ - sudo apt-get install build-essential - sudo apt-get install libjson-c-dev || true - sudo apt-get install libjson0-dev || true + - sudo apt-get install libbsd-dev || true language: c diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.01/Makefile new/health-check-0.03.04/Makefile --- old/health-check-0.03.01/Makefile 2019-06-14 15:18:49.000000000 +0200 +++ new/health-check-0.03.04/Makefile 2019-12-16 14:01:05.000000000 +0100 @@ -15,7 +15,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # -VERSION=0.03.01 +VERSION=0.03.04 # # Codename "Where have all my cycles gone?" # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.01/net.c new/health-check-0.03.04/net.c --- old/health-check-0.03.01/net.c 2019-06-14 15:18:49.000000000 +0200 +++ new/health-check-0.03.04/net.c 2019-12-16 14:01:05.000000000 +0100 @@ -170,11 +170,12 @@ * net_get_inode_by_path() * given a /proc/$pid/fd/fdnum path, look up a network inode */ -static int net_get_inode_by_path(const char *path, uint64_t *inode, char *link) +static int net_get_inode_by_path(const char *path, uint64_t *inode, char *link, const size_t link_len) { ssize_t len; + *inode = 0; - if ((len = readlink(path, link, PATH_MAX)) < 0) { + if ((len = readlink(path, link, link_len - 1)) < 0) { *link = '\0'; return -1; } @@ -188,12 +189,12 @@ */ static net_hash_t *net_cache_inode_by_pid_and_fd(const pid_t pid, const int fd) { - char path[PATH_MAX], link[PATH_MAX]; + char path[PATH_MAX], link[PATH_MAX + 1]; uint64_t inode; net_hash_t *nh = NULL; snprintf(path, sizeof(path), "/proc/%i/fd/%i", pid, fd); - if (net_get_inode_by_path(path, &inode, link) != -1) + if (net_get_inode_by_path(path, &inode, link, sizeof(link)) != -1) nh = net_hash_add(link, inode, pid, fd); return nh; @@ -245,7 +246,7 @@ while ((d = readdir(fds)) != NULL) { uint64_t inode; char tmp[PATH_MAX + sizeof(d->d_name) + 2]; - char link[PATH_MAX]; + char link[PATH_MAX + 1]; uint32_t fd; if (d->d_name[0] == '.') @@ -254,7 +255,7 @@ continue; snprintf(tmp, sizeof(tmp), "%s/%s", path, d->d_name); - if (net_get_inode_by_path(tmp, &inode, link) != -1) { + if (net_get_inode_by_path(tmp, &inode, link, sizeof(link)) != -1) { sscanf(d->d_name, "%" SCNu32, &fd); if (net_hash_add(link, inode, pid, fd) == NULL) { (void)closedir(fds); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.01/proc.c new/health-check-0.03.04/proc.c --- old/health-check-0.03.01/proc.c 2019-06-14 15:18:49.000000000 +0200 +++ new/health-check-0.03.04/proc.c 2019-12-16 14:01:05.000000000 +0100 @@ -296,7 +296,7 @@ proc_info_t *p = (proc_info_t *)l->data; if (p->cmdline && strcmp(p->cmdline, procname) == 0) { - proc_pids_add_proc(pids, p); + (void)proc_pids_add_proc(pids, p); found = true; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/health-check-0.03.01/syscall.c new/health-check-0.03.04/syscall.c --- old/health-check-0.03.01/syscall.c 2019-06-14 15:18:49.000000000 +0200 +++ new/health-check-0.03.04/syscall.c 2019-12-16 14:01:05.000000000 +0100 @@ -1804,8 +1804,12 @@ char buf[64]; syscall_wakelock_info_t *info = (syscall_wakelock_info_t *)ls->data; time_t whence_time = (time_t)info->tv.tv_sec; - struct tm *whence_tm = localtime(&whence_time); + struct tm whence_null_tm, *whence_tm = localtime(&whence_time); + if (!whence_tm) { + (void)memset(&whence_null_tm, 0, sizeof(whence_null_tm)); + whence_tm = &whence_null_tm; + } strftime(buf, sizeof(buf), "%x %X", whence_tm); if (info->locked) {
