[ruby-RMagick/f20: 2/2] Support -Werror=format-security
Mamoru TASAKA
mtasaka at fedoraproject.org
Tue Dec 3 14:14:45 UTC 2013
commit 676b37e48cdb1d7217e43069351af7eabe8438f7
Author: Mamoru TASAKA <mtasaka at fedoraproject.org>
Date: Tue Dec 3 23:14:21 2013 +0900
Support -Werror=format-security
RMagick-2.13.1-format-security.patch | 20 ++++++++++++++++++++
ruby-RMagick.spec | 8 +++++++-
2 files changed, 27 insertions(+), 1 deletions(-)
---
diff --git a/RMagick-2.13.1-format-security.patch b/RMagick-2.13.1-format-security.patch
new file mode 100644
index 0000000..b098930
--- /dev/null
+++ b/RMagick-2.13.1-format-security.patch
@@ -0,0 +1,20 @@
+--- RMagick-2.13.1/ext/RMagick/rmutil.c.format 2009-12-21 19:34:58.000000000 +0900
++++ RMagick-2.13.1/ext/RMagick/rmutil.c 2013-12-03 22:56:36.000000000 +0900
+@@ -1609,7 +1609,7 @@
+ void
+ rm_fatal_error_handler(const ExceptionType severity, const char *reason, const char *description)
+ {
+- rb_raise(Class_FatalImageMagickError, GetLocaleExceptionMessage(severity, reason));
++ rb_raise(Class_FatalImageMagickError, "%s", GetLocaleExceptionMessage(severity, reason));
+ description = description;
+ }
+
+@@ -1649,7 +1649,7 @@
+ exception->description ? ": " : "",
+ exception->description ? GetLocaleExceptionMessage(exception->severity, exception->description) : "");
+ msg[sizeof(msg)-1] = '\0';
+- rb_warning(msg);
++ rb_warning("%s", msg);
+
+ // Caller deletes ExceptionInfo...
+
diff --git a/ruby-RMagick.spec b/ruby-RMagick.spec
index a2c9584..8a3ce4f 100644
--- a/ruby-RMagick.spec
+++ b/ruby-RMagick.spec
@@ -19,7 +19,7 @@ Requires: ImageMagick = %2\
%define mainver 2.13.1
%undefine betaver
-%define fedorarel 12
+%define fedorarel 13
Name: ruby-%{modname}
@@ -44,6 +44,8 @@ Patch2: RMagick-2.13.1-Fixed-installation-issue-due-to-newer-ruby.patch
# Fixes undefined method `+' error.
# https://github.com/rmagick/rmagick/pull/71
Patch3: RMagick-2.13.1-Prevent-failure-when-prefix-is-empty-string.patch
+# Support -Werror=format-security
+Patch4: RMagick-2.13.1-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@@ -108,6 +110,7 @@ This package contains documentaton files for %{name}.
%patch2 -p1
%patch3 -p1
+%patch4 -p1
%build
export CFLAGS="$RPM_OPT_FLAGS"
@@ -181,6 +184,9 @@ ruby -Ctest -I../lib -I../ext/RMagick/ all_basic.rb || :
%doc DOCDIR/HTML/*
%changelog
+* Tue Dec 3 2013 Mamoru TASAKA <mtasaka at fedoraproject.org> - 2.13.1-13
+- Support -Werror=format-security
+
* Sun Oct 13 2013 Mamoru TASAKA <mtasaka at fedoraproject.org>
- Rebuild against new ImageMagick
More information about the scm-commits
mailing list