Hello community, here is the log from the commit of package cpustat for openSUSE:Factory checked in at 2020-11-12 22:47:48 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/cpustat (Old) and /work/SRC/openSUSE:Factory/.cpustat.new.24930 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "cpustat" Thu Nov 12 22:47:48 2020 rev:9 rq:847943 version:0.02.13 Changes: -------- --- /work/SRC/openSUSE:Factory/cpustat/cpustat.changes 2020-09-12 00:13:02.433244453 +0200 +++ /work/SRC/openSUSE:Factory/.cpustat.new.24930/cpustat.changes 2020-11-12 22:49:50.646796455 +0100 @@ -1,0 +2,6 @@ +Sat Nov 7 18:15:51 UTC 2020 - Martin Hauke <[email protected]> + +- Update to version 0.02.13 + * cpustat: handle case where comm field contains ) and spaces + +------------------------------------------------------------------- Old: ---- cpustat-0.02.12.tar.xz New: ---- cpustat-0.02.13.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ cpustat.spec ++++++ --- /var/tmp/diff_new_pack.aDXMyL/_old 2020-11-12 22:49:51.202797035 +0100 +++ /var/tmp/diff_new_pack.aDXMyL/_new 2020-11-12 22:49:51.210797043 +0100 @@ -2,7 +2,7 @@ # spec file for package cpustat # # Copyright (c) 2020 SUSE LLC -# Copyright (c) 2017, Martin Hauke <[email protected]> +# Copyright (c) 2017-2020, Martin Hauke <[email protected]> # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ Name: cpustat -Version: 0.02.12 +Version: 0.02.13 Release: 0 Summary: Periodic cpu utilization statistics License: GPL-2.0-or-later ++++++ cpustat-0.02.12.tar.xz -> cpustat-0.02.13.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.12/Makefile new/cpustat-0.02.13/Makefile --- old/cpustat-0.02.12/Makefile 2020-09-10 14:15:01.000000000 +0200 +++ new/cpustat-0.02.13/Makefile 2020-11-07 17:55:13.000000000 +0100 @@ -18,7 +18,7 @@ # Author: Colin Ian King <[email protected]> # -VERSION=0.02.12 +VERSION=0.02.13 CFLAGS += -Wall -Wextra -DVERSION='"$(VERSION)"' -O2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/cpustat-0.02.12/cpustat.c new/cpustat-0.02.13/cpustat.c --- old/cpustat-0.02.12/cpustat.c 2020-09-10 14:15:01.000000000 +0200 +++ new/cpustat-0.02.13/cpustat.c 2020-11-07 17:55:13.000000000 +0100 @@ -1913,11 +1913,23 @@ ptr++; tmp = info.comm; while ((*ptr != '\0') && (*ptr !=')') && - ((size_t)(tmp - info.comm) < sizeof(info.comm))) + ((size_t)(tmp - info.comm) < sizeof(info.comm))) { *tmp++ = *ptr++; + } if (UNLIKELY(*ptr != ')')) continue; *tmp = '\0'; + + /* + * a process may mess with the comm field and name itself + * with multiple ) and spaces, so scan past all these to get to the + * next legtimate field + */ + for (tmp = ptr; *tmp; tmp++) { + if (*tmp == ')') + ptr = tmp; + } + ptr++; if (UNLIKELY(*ptr != ' ')) continue; _______________________________________________ openSUSE Commits mailing list -- [email protected] To unsubscribe, email [email protected] List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/[email protected]
