1037313: Fix FTBS when Werror=format-security.

This commit is contained in:
Simon Lukasik 2014-02-03 11:47:30 +01:00
parent d0cb715304
commit 346e9668ea
2 changed files with 18 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -Naur ncurses-ruby-1.3.1/form_wrap.c ncurses-ruby-1.3.1.format/form_wrap.c
--- ncurses-ruby-1.3.1/form_wrap.c 2014-02-03 11:31:39.049867878 +0100
+++ ncurses-ruby-1.3.1.format/form_wrap.c 2014-02-03 11:44:37.001008654 +0100
@@ -1132,7 +1132,7 @@
char msg[500];
snprintf(msg, 500, "The validation functions for this field type need %d additional arguments.",(int)(NUM2INT(argc)-1));
msg[499]=0;
- rb_raise(rb_eArgError, msg);
+ rb_raise(rb_eArgError, "%s", msg);
}
}
}

View File

@ -4,13 +4,14 @@
Name: %distname
Version: 1.3.1
Release: 9%{?dist}
Release: 10%{?dist}
Summary: A module for ruby applications for using ncurses interfaces
Group: System Environment/Libraries
License: LGPLv2+
URL: http://ncurses-ruby.berlios.de/
Source0: http://download.berlios.de/ncurses-ruby/%{realname}-%{version}.tar.bz2
Patch0: 0001-STR2CSTR-deprecated.patch
Patch1: 0002-Werror-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: ruby(release) >= %{rubyabi}
BuildRequires: ruby
@ -27,6 +28,7 @@ of the C library ncurses accessible from the Ruby programming language.
%prep
%setup -q -n %{realname}-%{version}
%patch0 -p1 -b .p
%patch1 -p1 -b .format
%{__chmod} 0644 ncurses_wrap.c
find examples/ -type f | xargs %{__chmod} 0644
@ -52,6 +54,9 @@ ruby extconf.rb --vendor
%{ruby_vendorlibdir}/ncurses_sugar.rb
%changelog
* Mon Feb 03 2014 Šimon Lukašík <slukasik@redhat.com> - 1.3.1-10
- FTBFS if "-Werror=format-security" flag is used (#1037313)
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild