Fix -Werror=format-security (bug #1037053)

This commit is contained in:
Orion Poplawski 2013-12-23 10:04:27 -07:00
parent a4299a9c9d
commit 6175ad238c
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,31 @@
diff -up modules-3.2.10/ModuleCmd_Avail.c.format modules-3.2.10/ModuleCmd_Avail.c
--- modules-3.2.10/ModuleCmd_Avail.c.format 2012-12-13 15:17:27.000000000 -0700
+++ modules-3.2.10/ModuleCmd_Avail.c 2013-12-23 10:02:16.676973523 -0700
@@ -257,7 +257,7 @@ int ModuleCmd_Avail( Tcl_Interp *interp,
**/
if( sw_format & SW_LONG)
- fprintf( stderr, long_header);
+ fprintf( stderr, "%s", long_header);
/**
** If a module category is specified check whether it is part
diff -up modules-3.2.10/ModuleCmd_Display.c.format modules-3.2.10/ModuleCmd_Display.c
--- modules-3.2.10/ModuleCmd_Display.c.format 2012-11-01 16:02:19.000000000 -0600
+++ modules-3.2.10/ModuleCmd_Display.c 2013-12-23 10:03:32.677504785 -0700
@@ -161,13 +161,13 @@ int ModuleCmd_Display( Tcl_Interp *inter
g_current_module = modulename;
- fprintf( stderr, local_line);
+ fprintf( stderr, "%s", local_line);
fprintf( stderr, "%s:\n\n", modulefile);
result = CallModuleProcedure( disp_interp, &cmdbuf, modulefile,
"ModulesDisplay", 0);
- fprintf( stderr, local_line);
+ fprintf( stderr, "%s", local_line);
/**
** Remove the Tcl interpreter that has been used for printing ...

View File

@ -1,6 +1,6 @@
Name: environment-modules Name: environment-modules
Version: 3.2.10 Version: 3.2.10
Release: 7%{?dist} Release: 8%{?dist}
Summary: Provides dynamic modification of a user's environment Summary: Provides dynamic modification of a user's environment
Group: System Environment/Base Group: System Environment/Base
@ -19,6 +19,9 @@ Patch1: environment-modules-versioning.patch
Patch2: environment-modules-clear.patch Patch2: environment-modules-clear.patch
# Patch from modules list to add completion to avail command # Patch from modules list to add completion to avail command
Patch3: environment-modules-avail.patch Patch3: environment-modules-avail.patch
# Fix -Werror=format-security
# https://bugzilla.redhat.com/show_bug.cgi?id=1037053
Patch4: environment-modules-format.patch
BuildRequires: tcl-devel, tclx-devel, libX11-devel BuildRequires: tcl-devel, tclx-devel, libX11-devel
BuildRequires: dejagnu BuildRequires: dejagnu
@ -57,6 +60,7 @@ have access to the module alias.
%patch1 -p1 -b .versioning %patch1 -p1 -b .versioning
%patch2 -p1 -b .clear %patch2 -p1 -b .clear
%patch3 -p1 -b .avail %patch3 -p1 -b .avail
%patch4 -p1 -b .format
%build %build
@ -98,6 +102,9 @@ make test
%changelog %changelog
* Mon Dec 23 2013 Orion Poplawski <orion@cora.nwra.com> - 3.2.10-8
- Fix -Werror=format-security (bug #1037053)
* Wed Sep 4 2013 Orion Poplawski <orion@cora.nwra.com> - 3.2.10-7 * Wed Sep 4 2013 Orion Poplawski <orion@cora.nwra.com> - 3.2.10-7
- Update createmodule scripts to handle more path like variables (bug #976647) - Update createmodule scripts to handle more path like variables (bug #976647)