From 6175ad238cd96c0bd421e6f3543208bceb935b1d Mon Sep 17 00:00:00 2001 From: Orion Poplawski Date: Dec 23 2013 17:04:27 +0000 Subject: Fix -Werror=format-security (bug #1037053) --- diff --git a/environment-modules-format.patch b/environment-modules-format.patch new file mode 100644 index 0000000..3d2b8c2 --- /dev/null +++ b/environment-modules-format.patch @@ -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 ... diff --git a/environment-modules.spec b/environment-modules.spec index 3abc2d3..6868c76 100644 --- a/environment-modules.spec +++ b/environment-modules.spec @@ -1,6 +1,6 @@ Name: environment-modules Version: 3.2.10 -Release: 7%{?dist} +Release: 8%{?dist} Summary: Provides dynamic modification of a user's environment Group: System Environment/Base @@ -19,6 +19,9 @@ Patch1: environment-modules-versioning.patch Patch2: environment-modules-clear.patch # Patch from modules list to add completion to avail command 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: dejagnu @@ -57,6 +60,7 @@ have access to the module alias. %patch1 -p1 -b .versioning %patch2 -p1 -b .clear %patch3 -p1 -b .avail +%patch4 -p1 -b .format %build @@ -98,6 +102,9 @@ make test %changelog +* Mon Dec 23 2013 Orion Poplawski - 3.2.10-8 +- Fix -Werror=format-security (bug #1037053) + * Wed Sep 4 2013 Orion Poplawski - 3.2.10-7 - Update createmodule scripts to handle more path like variables (bug #976647)