Backported upstream patches to resolve RHBZ#1728450.
This commit is contained in:
parent
ef9c9d9562
commit
38bf7c968a
54
scl-utils-2.0.2-rhbz-1728450.patch
Normal file
54
scl-utils-2.0.2-rhbz-1728450.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From 3538686a21279c60c916e82ece02efcd88ae95b9 Mon Sep 17 00:00:00 2001
|
||||
From: Joe Orton <jorton@redhat.com>
|
||||
Date: Thu, 8 Aug 2019 09:26:00 +0100
|
||||
Subject: [PATCH] Fix crashes in "scl list-enabled":
|
||||
|
||||
* src/lib_common.c (merge_string_arrays):
|
||||
Ensure elements of returned array are strdup()ed.
|
||||
|
||||
* src/scllib.c (get_enabled_collections):
|
||||
Ensure all elements of returned array are strdup()ed.
|
||||
|
||||
Ref: https://bugzilla.redhat.com/show_bug.cgi?id=1728450
|
||||
---
|
||||
src/lib_common.c | 5 +++++
|
||||
src/scllib.c | 2 +-
|
||||
2 files changed, 6 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/lib_common.c b/src/lib_common.c
|
||||
index 1aa49a0..2e7d116 100644
|
||||
--- a/src/lib_common.c
|
||||
+++ b/src/lib_common.c
|
||||
@@ -7,6 +7,7 @@
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
#include <wordexp.h>
|
||||
+#include <assert.h>
|
||||
|
||||
#include "errors.h"
|
||||
#include "scllib.h"
|
||||
@@ -269,6 +270,10 @@ char **merge_string_arrays(char *const *array1, char *const *array2)
|
||||
}
|
||||
merged_array[++prev] = NULL;
|
||||
|
||||
+ for (int i = 0; i < prev; i++) {
|
||||
+ merged_array[i] = xstrdup(merged_array[i]);
|
||||
+ }
|
||||
+
|
||||
return merged_array;
|
||||
}
|
||||
|
||||
diff --git a/src/scllib.c b/src/scllib.c
|
||||
index ce8df90..3c32d65 100644
|
||||
--- a/src/scllib.c
|
||||
+++ b/src/scllib.c
|
||||
@@ -107,8 +107,8 @@ scl_rc get_enabled_collections(char ***_enabled_collections)
|
||||
sizeof(SCL_MODULES_PATH - 1))){
|
||||
|
||||
enabled_collections[i] += sizeof(SCL_MODULES_PATH);
|
||||
- enabled_collections[i] = xstrdup(enabled_collections[i]);
|
||||
}
|
||||
+ enabled_collections[i] = xstrdup(enabled_collections[i]);
|
||||
}
|
||||
|
||||
}
|
@ -4,7 +4,7 @@
|
||||
Name: scl-utils
|
||||
Epoch: 1
|
||||
Version: 2.0.2
|
||||
Release: 15%{dist}
|
||||
Release: 16%{dist}
|
||||
Summary: Utilities for alternative packaging
|
||||
|
||||
License: GPLv2+
|
||||
@ -18,6 +18,9 @@ Requires: %{_bindir}/modulecmd
|
||||
|
||||
Patch1: 0003-Scl-utils-layout-patch-from-fedora-famillecollet.com.patch
|
||||
|
||||
# https://github.com/sclorg/scl-utils/pull/25
|
||||
Patch100: scl-utils-2.0.2-rhbz-1728450.patch
|
||||
|
||||
%description
|
||||
Run-time utility for alternative packaging.
|
||||
|
||||
@ -75,6 +78,9 @@ ln -s prefixes conf
|
||||
%{_rpmconfigdir}/brp-scl-python-bytecompile
|
||||
|
||||
%changelog
|
||||
* Wed Jul 29 2020 Vitaly Zaitsev <vitaly@easycoding.org> - 1:2.0.2-16
|
||||
- Backported upstream patches to resolve RHBZ#1728450.
|
||||
|
||||
* Wed Jul 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 1:2.0.2-15
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user