From d055b794264dee10bbe40ca19e2d9e543c3bdfd1 Mon Sep 17 00:00:00 2001 From: DistroBaker Date: Sun, 21 Feb 2021 21:25:23 +0000 Subject: [PATCH] Merged update from upstream sources This is an automated DistroBaker update from upstream sources. If you do not know what this is about or would like to opt out, contact the OSCI team. Source: https://src.fedoraproject.org/rpms/gnome-system-monitor.git#a39330b0bd12c2179b3947ea9c94d43ebc0d7c94 --- 0001-load-graph-fix-out-of-bounds-error.patch | 36 +++++++++++++++++++ gnome-system-monitor.spec | 7 +++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 0001-load-graph-fix-out-of-bounds-error.patch diff --git a/0001-load-graph-fix-out-of-bounds-error.patch b/0001-load-graph-fix-out-of-bounds-error.patch new file mode 100644 index 0000000..3db7e8c --- /dev/null +++ b/0001-load-graph-fix-out-of-bounds-error.patch @@ -0,0 +1,36 @@ +From 5076dae1bfdc3e127b3da6e1556e0e6db5168375 Mon Sep 17 00:00:00 2001 +From: Abderrahim Kitouni +Date: Sat, 13 Feb 2021 16:48:47 +0100 +Subject: [PATCH] load-graph: fix out-of-bounds error + +--- + src/load-graph.cpp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/src/load-graph.cpp b/src/load-graph.cpp +index 3285d111..5282ce23 100644 +--- a/src/load-graph.cpp ++++ b/src/load-graph.cpp +@@ -628,7 +628,7 @@ net_scale (LoadGraph *graph, guint64 din, guint64 dout) + new_max = dmax; + else + new_max = *std::max_element(&graph->net.values[0], +- &graph->net.values[graph->num_points]); ++ &graph->net.values[graph->num_points - 1]); + + // + // Round network maximum +@@ -792,8 +792,8 @@ load_graph_update_data (LoadGraph *graph) + { + // Rotate data one element down. + std::rotate(&graph->data[0], +- &graph->data[graph->num_points - 1], +- &graph->data[graph->num_points]); ++ &graph->data[graph->num_points - 2], ++ &graph->data[graph->num_points - 1]); + + // Update rotation counter. + graph->latest = (graph->latest + 1) % graph->num_points; +-- +2.30.1 + diff --git a/gnome-system-monitor.spec b/gnome-system-monitor.spec index 29c46fd..5ce7949 100644 --- a/gnome-system-monitor.spec +++ b/gnome-system-monitor.spec @@ -4,7 +4,7 @@ Name: gnome-system-monitor Version: 40~beta -Release: 1%{?dist} +Release: 2%{?dist} Summary: Process and resource monitor License: GPLv2+ @@ -28,6 +28,8 @@ BuildRequires: polkit-devel Requires: hicolor-icon-theme Requires: libgtop2%{?_isa} >= %{libgtop2_version} +Patch0: 0001-load-graph-fix-out-of-bounds-error.patch + %description gnome-system-monitor allows to graphically view and manipulate the running processes on your system. It also provides an overview of available resources @@ -65,6 +67,9 @@ desktop-file-validate $RPM_BUILD_ROOT%{_datadir}/applications/gnome-system-monit %{_libexecdir}/gnome-system-monitor/ %changelog +* Sun Feb 21 2021 Ɓukasz Patron - 40~beta-2 +- Backport an upstream patch to fix out-of-bounds error when opening resources tab (MR #38) + * Thu Feb 18 2021 Kalev Lember - 40~beta-1 - Update to 40.beta