[vconfig] Fix a security warning by compiler

Petr Pisar ppisar at fedoraproject.org
Tue Dec 3 12:25:24 UTC 2013


commit c86bbf7220d3a2e5f661c5d8da4b81ff6c336738
Author: Petr Písař <ppisar at redhat.com>
Date:   Tue Dec 3 12:58:22 2013 +0100

    Fix a security warning by compiler

 ...s-compilation-with-Werror-format-security.patch |   31 ++++++++++++++++++++
 vconfig.spec                                       |    8 ++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/vconfig-1.9-Pass-compilation-with-Werror-format-security.patch b/vconfig-1.9-Pass-compilation-with-Werror-format-security.patch
new file mode 100644
index 0000000..a41be37
--- /dev/null
+++ b/vconfig-1.9-Pass-compilation-with-Werror-format-security.patch
@@ -0,0 +1,31 @@
+From c84508d59dacf91a89582fed6115714f42f706aa Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20P=C3=ADsa=C5=99?= <ppisar at redhat.com>
+Date: Tue, 3 Dec 2013 12:54:53 +0100
+Subject: [PATCH] Pass compilation with -Werror=format-security
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+<https://bugzilla.redhat.com/show_bug.cgi?id=1037376>
+
+Signed-off-by: Petr Písař <ppisar at redhat.com>
+---
+ vconfig.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/vconfig.c b/vconfig.c
+index 5057cfd..77cf4b3 100644
+--- a/vconfig.c
++++ b/vconfig.c
+@@ -36,7 +36,7 @@
+ #define MAX_HOSTNAME 256
+ 
+ 
+-static char* usage = 
++static const char usage[] =
+       "\n"
+ "Usage: add             [interface-name] [vlan_id]\n"
+ "       rem             [vlan-name]\n"
+-- 
+1.8.3.1
+
diff --git a/vconfig.spec b/vconfig.spec
index 19322b5..cd5a011 100644
--- a/vconfig.spec
+++ b/vconfig.spec
@@ -1,10 +1,12 @@
 Summary: Linux 802.1q VLAN configuration utility
 Name: vconfig
 Version: 1.9
-Release: 13%{?dist}
+Release: 14%{?dist}
 License: GPLv2+
 Group: System Environment/Base
 Source: http://www.candelatech.com/~greear/vlan/vlan.%{version}.tar.gz
+# Fix a security warning by compiler, bug #1037376
+Patch0: %{name}-1.9-Pass-compilation-with-Werror-format-security.patch
 URL: http://www.candelatech.com/~greear/vlan.html
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 %define _sbin /sbin
@@ -14,6 +16,7 @@ The vconfig program configures and adjusts 802.1q VLAN parameters.
 
 %prep
 %setup -q -n vlan
+%patch0 -p1 -b .warning
 
 %build
 make clean
@@ -36,6 +39,9 @@ rm -rf ${RPM_BUILD_ROOT}
 %{_mandir}/man8/vconfig.8*
 
 %changelog
+* Tue Dec 03 2013 Petr Pisar <ppisar at redhat.com> - 1.9-14
+- Fix a security warning by compiler (bug #1037376)
+
 * Sun Aug 04 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.9-13
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
 


More information about the scm-commits mailing list