diff --git a/environment-modules-strcpy.patch b/environment-modules-strcpy.patch new file mode 100644 index 0000000..1d97473 --- /dev/null +++ b/environment-modules-strcpy.patch @@ -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 diff --git a/environment-modules.spec b/environment-modules.spec index ffda4e3..104a2ab 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -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 - 3.2.8a-3 +- Add patch to fix overlapping strcpy() in Remove_Path, hopefully fixes + bug 737043 + * Tue Feb 08 2011 Fedora Release Engineering - 3.2.8a-2 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild