Add patch to fix overlapping strcpy() in Remove_Path, hopefully fixes

bug 737043
This commit is contained in:
Orion Poplawski 2011-09-22 12:50:58 -06:00
parent 982956a5fa
commit 5a9357c2ce
2 changed files with 19 additions and 1 deletions

View File

@ -0,0 +1,11 @@
--- modules-3.2.8/cmdPath.c.strcpy 2010-09-23 16:47:15.000000000 -0600
+++ modules-3.2.8/cmdPath.c 2011-09-22 12:46:55.893813323 -0600
@@ -797,7 +797,7 @@
** We must be in SW_STATE3 or not in SW_STATE at all.
** Removing the marker should be just like removing any other path.
**/
- strcpy( startp + start_offset, endp);
+ memmove( startp + start_offset, endp, strlen(endp)+1);
/**
** Cache the set. Clear the variable from the unset table just

View File

@ -1,6 +1,6 @@
Name: environment-modules
Version: 3.2.8a
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Provides dynamic modification of a user's environment
Group: System Environment/Base
@ -10,6 +10,8 @@ Source0: http://downloads.sourceforge.net/modules/modules-%{version}.tar.
Source1: modules.sh
Source2: createmodule.sh
Patch0: environment-modules-3.2.7-bindir.patch
#Fix overlapping strcpy()
Patch1: environment-modules-strcpy.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: tcl-devel, tclx-devel, libX11-devel
@ -45,6 +47,7 @@ have access to the module alias.
%prep
%setup -q -n modules-3.2.8
%patch0 -p1 -b .bindir
%patch1 -p1 -b .strcpy
%build
@ -83,6 +86,10 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Thu Sep 22 2011 Orion Poplawski <orion@cora.nwra.com> - 3.2.8a-3
- Add patch to fix overlapping strcpy() in Remove_Path, hopefully fixes
bug 737043
* Tue Feb 08 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 3.2.8a-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild