[BitchX] Add patch for "-Werror=format-security"
Dan Mashal
vicodan at fedoraproject.org
Wed Dec 4 21:45:16 UTC 2013
commit aa991ce5c0719c88affeff8c6afe01b6d33515c0
Author: Dan Mashal <dan.mashal at fedoraproject.org>
Date: Wed Dec 4 13:44:56 2013 -0800
Add patch for "-Werror=format-security"
BitchX.spec | 8 +++++++-
format-security.patch | 24 ++++++++++++++++++++++++
2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/BitchX.spec b/BitchX.spec
index 4d3603a..2fbf087 100644
--- a/BitchX.spec
+++ b/BitchX.spec
@@ -1,11 +1,13 @@
Summary: IrcII chat client
Name: BitchX
Version: 1.2.1
-Release: 3%{?dist}
+Release: 4%{?dist}
License: BSD and GPLv2+
Group: Applications/Communications
URL: http://www.bitchx.ca
Source0: http://www.bitchx.ca/%{name}-%{version}.tar.gz
+#RHBZ 1037000
+Patch0: format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ncurses-devel openssl-devel glib2-devel
@@ -14,6 +16,7 @@ BitchX: The ultimate IRC client
%prep
%setup -q -n %{name}-%{version}
+%patch0 -p1
%build
%configure --with-plugins --with-ssl --enable-ipv6
@@ -35,6 +38,9 @@ rm -rf %{buildroot}
%{_mandir}/man1/*
%changelog
+* Wed Dec 04 2013 Dan Mashal <dan.mashal at fedoraproject.org> - 1.2.1-4
+- Fix RHBZ #1037000 to enable "-Werror=format-security".
+
* Fri Aug 02 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..cea0e60
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,24 @@
+diff -uNrp a/dll/fserv/fserv.c b/dll/fserv/fserv.c
+--- a/dll/fserv/fserv.c 2012-12-31 20:55:05.000000000 -0800
++++ b/dll/fserv/fserv.c 2013-12-04 13:19:51.771329650 -0800
+@@ -244,7 +244,7 @@ char *make_mp3_string(FILE *fp, Files *f
+ fs++;
+ }
+ if (fp && *buffer)
+- fprintf(fp, buffer);
++ fprintf(fp, "%s", buffer);
+ return buffer;
+ }
+
+diff -uNrp a/source/dcc.c b/source/dcc.c
+--- a/source/dcc.c 2012-12-31 20:55:05.000000000 -0800
++++ b/source/dcc.c 2013-12-04 13:22:13.508923013 -0800
+@@ -2750,7 +2750,7 @@ register int i = 0;
+ /* chop(transfer_buffer, 1);*/
+ if (fget_string_var(FORMAT_DCC_FSET))
+ {
+- sprintf(DCC_current_transfer_buffer, convert_output_format(fget_string_var(FORMAT_DCC_FSET), "%s", transfer_buffer));
++ sprintf(DCC_current_transfer_buffer, "%s", convert_output_format(fget_string_var(FORMAT_DCC_FSET), transfer_buffer));
+ chop(DCC_current_transfer_buffer, 4);
+ }
+ else
More information about the scm-commits
mailing list