From 5129c8b9ea2e301942c9834a873c9465e5169f2a Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 07 2023 09:26:21 +0000 Subject: import openscap-1.2.17-15.el7_9 --- diff --git a/SOURCES/openscap-1.3.7-prevent_memory_error-PR_1861.patch b/SOURCES/openscap-1.3.7-prevent_memory_error-PR_1861.patch new file mode 100644 index 0000000..b2951ff --- /dev/null +++ b/SOURCES/openscap-1.3.7-prevent_memory_error-PR_1861.patch @@ -0,0 +1,22 @@ +From 12f9c02a612bb1687676b74a4739126b1913b1fe Mon Sep 17 00:00:00 2001 +From: Ajay Nair +Date: Mon, 9 May 2022 13:31:47 -0400 +Subject: [PATCH] Reset errno before call to strtoll + +--- + src/common/memusage.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/common/memusage.c b/src/common/memusage.c +index c6755f21f1..ffa70b662b 100644 +--- a/src/common/memusage.c ++++ b/src/common/memusage.c +@@ -71,6 +71,8 @@ static int read_common_sizet(void *szp, char *strval) + return (-1); + + *end = '\0'; ++ ++ errno = 0; + *(size_t *)szp = strtoll(strval, NULL, 10); + + if (errno == EINVAL || diff --git a/SPECS/openscap.spec b/SPECS/openscap.spec index 46c75ce..5f079de 100644 --- a/SPECS/openscap.spec +++ b/SPECS/openscap.spec @@ -7,7 +7,7 @@ restorecon -R /usr/bin/oscap /usr/libexec/openscap; \ Name: openscap Version: 1.2.17 -Release: 14%{?dist} +Release: 15%{?dist} Summary: Set of open source libraries enabling integration of the SCAP line of standards Group: System Environment/Libraries License: LGPLv2+ @@ -49,6 +49,7 @@ Patch33: openscap-1.3.5-fix_testresult_benchmark-PR_1655.patch Patch34: openscap-1.3.1-improve_stig-viewer_output-PR_1319.patch Patch35: openscap-1.3.5-fix_segfaults_and_broken_test-PR_1669.patch Patch36: openscap-1.2.18-memory-limits-PR_1803.patch +Patch37: openscap-1.3.7-prevent_memory_error-PR_1861.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: swig libxml2-devel libxslt-devel perl-XML-Parser BuildRequires: rpm-devel @@ -200,6 +201,7 @@ Tool for scanning Atomic containers. %patch34 -p1 %patch35 -p1 %patch36 -p1 +%patch37 -p1 %build %ifarch sparc64 @@ -355,6 +357,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Tue Jan 31 2023 Jan Černý - 1.2.17-15 +- Prevent memory errors (rhbz#2111041) + * Wed Aug 11 2021 Marcus Burghardt - 1.2.17-14 - Fix memory leaks in probe-api (RHBZ#1861793) - Prevent duplicate variables in Ansible Playbooks (RHBZ#1944683)