Hello community,

here is the log from the commit of package oprofile for openSUSE:Factory 
checked in at 2018-10-31 13:15:14
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/oprofile (Old)
 and      /work/SRC/openSUSE:Factory/.oprofile.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "oprofile"

Wed Oct 31 13:15:14 2018 rev:51 rq:645375 version:1.3.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/oprofile/oprofile.changes        2018-07-28 
12:42:43.796694270 +0200
+++ /work/SRC/openSUSE:Factory/.oprofile.new/oprofile.changes   2018-10-31 
13:18:39.859213605 +0100
@@ -1,0 +2,6 @@
+Mon Oct 29 21:07:04 UTC 2018 - Tony Jones <to...@suse.com>
+
+- Handle empty event name gracefully on ppc.
+  New patch: oprofile-handle-empty-event-name-spec-gracefully-for-ppc.patch
+
+-------------------------------------------------------------------

New:
----
  oprofile-handle-empty-event-name-spec-gracefully-for-ppc.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ oprofile.spec ++++++
--- /var/tmp/diff_new_pack.g0w35S/_old  2018-10-31 13:18:42.663210972 +0100
+++ /var/tmp/diff_new_pack.g0w35S/_new  2018-10-31 13:18:42.667210968 +0100
@@ -12,7 +12,7 @@
 # license that conforms to the Open Source Definition (Version 1.9)
 # published by the Open Source Initiative.
 
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
 #
 
 
@@ -30,6 +30,7 @@
 Source5:        README-BEFORE-ADDING-PATCHES
 Patch1:         %{name}-no-libjvm-version.patch
 Patch2:         %{name}-pfm-ppc.patch
+Patch3:         %{name}-handle-empty-event-name-spec-gracefully-for-ppc.patch
 BuildRequires:  autoconf
 BuildRequires:  automake
 BuildRequires:  binutils-devel
@@ -101,6 +102,7 @@
 %setup -q
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 mkdir -p java/include
 # copy files necessary to build Java agent libraries

++++++ oprofile-handle-empty-event-name-spec-gracefully-for-ppc.patch ++++++
From: William Cohen <wco...@redhat.com>
Date: Fri Aug 3 10:10:12 2018 -0400
Subject: Handle empty event name spec gracefully for PPC
Git-commit 457d33de89939ffaa523c2a6377ed7d1506ce255
References: none
Signed-off-by: Tony Jones <to...@suse.de>

    Handle empty event name spec gracefully for PPC
    
    During testing Michael Petlan found that the giving an empty event
    name in the event spec to operf on PPC machines would cause operf
    crash.  Running the following following command would demonstrate
    this problem:
    
      operf -e : /bin/ls
    
    The problem was traced to event_name in _handle_powerpc_event_spec
    function having a length of 0.  The strncmp using event_name in
    _handle_powerpc_event_spec would indicate a match and cause strncpy to
    be called to copy zero bytes. The zero length strncpy would crash
    operf.  Added a check to make ensure that the string is non-zero
    length.
    
    Signed-off-by: William Cohen <wco...@redhat.com>

diff --git a/libpe_utils/op_pe_utils.cpp b/libpe_utils/op_pe_utils.cpp
index f9638c77..2cae7840 100644
--- a/libpe_utils/op_pe_utils.cpp
+++ b/libpe_utils/op_pe_utils.cpp
@@ -588,7 +588,7 @@ static string _handle_powerpc_event_spec(string event_spec)
                }
                if (line[0] == ' ' || line[0] == '\t')
                        continue;
-               if (!strncmp(line, event_name, evt_name_len)) {
+               if (evt_name_len && !strncmp(line, event_name, evt_name_len)) {
                        // Found a potential match.  Check if it's a perfect 
match.
                        string save_event_name = event_name;
                        size_t full_evt_len = index(line, ':') - line;

Reply via email to