1 |
jdhore 14/08/28 03:54:55 |
2 |
|
3 |
Added: paludis-2.0.0-fix-format-security.patch |
4 |
Log: |
5 |
Fix building with -Werror=format-security. Fixes bug #521326 |
6 |
|
7 |
Patch from upstream: http://git.exherbo.org/paludis/paludis.git/commit/?id=f777dadef601434550aa3fb411eebab04ad07103 |
8 |
|
9 |
(Portage version: 2.2.12/cvs/Linux i686, unsigned Manifest commit) |
10 |
|
11 |
Revision Changes Path |
12 |
1.1 sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch?rev=1.1&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-apps/paludis/files/paludis-2.0.0-fix-format-security.patch?rev=1.1&content-type=text/plain |
16 |
|
17 |
Index: paludis-2.0.0-fix-format-security.patch |
18 |
=================================================================== |
19 |
commit f777dadef601434550aa3fb411eebab04ad07103 |
20 |
Author: David Leverton <levertond@××××××××××.com> |
21 |
Date: Wed Aug 27 21:10:59 2014 +0100 |
22 |
|
23 |
Fix build with -Werror=format-security |
24 |
|
25 |
Fixes: Gentoo#521326 |
26 |
|
27 |
diff --git a/ruby/paludis_ruby.cc b/ruby/paludis_ruby.cc |
28 |
index 587601c..d58a8d0 100644 |
29 |
--- a/ruby/paludis_ruby.cc |
30 |
+++ b/ruby/paludis_ruby.cc |
31 |
@@ -173,19 +173,19 @@ void paludis::ruby::exception_to_ruby_exception(const std::exception & ee) |
32 |
rb_raise(rb_eRuntimeError, "Unexpected paludis::InternalError: %s (%s)", |
33 |
dynamic_cast<const paludis::InternalError *>(&ee)->message().c_str(), ee.what()); |
34 |
else if (0 != dynamic_cast<const paludis::GotASetNotAPackageDepSpec *>(&ee)) |
35 |
- rb_raise(c_got_a_set_not_a_package_dep_spec, dynamic_cast<const paludis::GotASetNotAPackageDepSpec *>(&ee)->message().c_str()); |
36 |
+ rb_raise(c_got_a_set_not_a_package_dep_spec, "%s", dynamic_cast<const paludis::GotASetNotAPackageDepSpec *>(&ee)->message().c_str()); |
37 |
else if (0 != dynamic_cast<const paludis::BadVersionSpecError *>(&ee)) |
38 |
- rb_raise(c_bad_version_spec_error, dynamic_cast<const paludis::BadVersionSpecError *>(&ee)->message().c_str()); |
39 |
+ rb_raise(c_bad_version_spec_error, "%s", dynamic_cast<const paludis::BadVersionSpecError *>(&ee)->message().c_str()); |
40 |
else if (0 != dynamic_cast<const paludis::SetNameError *>(&ee)) |
41 |
- rb_raise(c_set_name_error, dynamic_cast<const paludis::SetNameError *>(&ee)->message().c_str()); |
42 |
+ rb_raise(c_set_name_error, "%s", dynamic_cast<const paludis::SetNameError *>(&ee)->message().c_str()); |
43 |
else if (0 != dynamic_cast<const paludis::PackageNamePartError *>(&ee)) |
44 |
- rb_raise(c_package_name_part_error, dynamic_cast<const paludis::PackageNamePartError *>(&ee)->message().c_str()); |
45 |
+ rb_raise(c_package_name_part_error, "%s", dynamic_cast<const paludis::PackageNamePartError *>(&ee)->message().c_str()); |
46 |
else if (0 != dynamic_cast<const paludis::CategoryNamePartError *>(&ee)) |
47 |
- rb_raise(c_category_name_part_error, dynamic_cast<const paludis::CategoryNamePartError *>(&ee)->message().c_str()); |
48 |
+ rb_raise(c_category_name_part_error, "%s", dynamic_cast<const paludis::CategoryNamePartError *>(&ee)->message().c_str()); |
49 |
else if (0 != dynamic_cast<const paludis::NameError *>(&ee)) |
50 |
- rb_raise(c_name_error, dynamic_cast<const paludis::NameError *>(&ee)->message().c_str()); |
51 |
+ rb_raise(c_name_error, "%s", dynamic_cast<const paludis::NameError *>(&ee)->message().c_str()); |
52 |
else if (0 != dynamic_cast<const paludis::PackageDepSpecError *>(&ee)) |
53 |
- rb_raise(c_package_dep_spec_error, dynamic_cast<const paludis::PackageDepSpecError *>(&ee)->message().c_str()); |
54 |
+ rb_raise(c_package_dep_spec_error, "%s", dynamic_cast<const paludis::PackageDepSpecError *>(&ee)->message().c_str()); |
55 |
else if (0 != dynamic_cast<const paludis::AmbiguousPackageNameError *>(&ee)) |
56 |
{ |
57 |
VALUE ex_args[2]; |
58 |
@@ -198,19 +198,19 @@ void paludis::ruby::exception_to_ruby_exception(const std::exception & ee) |
59 |
rb_exc_raise(rb_class_new_instance(2, ex_args, c_ambiguous_package_name_error)); |
60 |
} |
61 |
else if (0 != dynamic_cast<const paludis::NoSuchPackageError *>(&ee)) |
62 |
- rb_raise(c_no_such_package_error, dynamic_cast<const paludis::NoSuchPackageError *>(&ee)->message().c_str()); |
63 |
+ rb_raise(c_no_such_package_error, "%s", dynamic_cast<const paludis::NoSuchPackageError *>(&ee)->message().c_str()); |
64 |
else if (0 != dynamic_cast<const paludis::NoSuchRepositoryError *>(&ee)) |
65 |
- rb_raise(c_no_such_repository_error, dynamic_cast<const paludis::NoSuchRepositoryError *>(&ee)->message().c_str()); |
66 |
+ rb_raise(c_no_such_repository_error, "%s", dynamic_cast<const paludis::NoSuchRepositoryError *>(&ee)->message().c_str()); |
67 |
else if (0 != dynamic_cast<const paludis::ConfigFileError *>(&ee)) |
68 |
- rb_raise(c_config_file_error, dynamic_cast<const paludis::ConfigFileError *>(&ee)->message().c_str()); |
69 |
+ rb_raise(c_config_file_error, "%s", dynamic_cast<const paludis::ConfigFileError *>(&ee)->message().c_str()); |
70 |
else if (0 != dynamic_cast<const paludis::ConfigurationError *>(&ee)) |
71 |
- rb_raise(c_configuration_error, dynamic_cast<const paludis::ConfigurationError *>(&ee)->message().c_str()); |
72 |
+ rb_raise(c_configuration_error, "%s", dynamic_cast<const paludis::ConfigurationError *>(&ee)->message().c_str()); |
73 |
else if (0 != dynamic_cast<const paludis::ActionFailedError *>(&ee)) |
74 |
- rb_raise(c_action_failed_error, dynamic_cast<const paludis::ActionFailedError *>(&ee)->message().c_str()); |
75 |
+ rb_raise(c_action_failed_error, "%s", dynamic_cast<const paludis::ActionFailedError *>(&ee)->message().c_str()); |
76 |
else if (0 != dynamic_cast<const paludis::ActionAbortedError *>(&ee)) |
77 |
- rb_raise(c_action_aborted_error, dynamic_cast<const paludis::ActionAbortedError *>(&ee)->message().c_str()); |
78 |
+ rb_raise(c_action_aborted_error, "%s", dynamic_cast<const paludis::ActionAbortedError *>(&ee)->message().c_str()); |
79 |
else if (0 != dynamic_cast<const paludis::BadVersionOperatorError *>(&ee)) |
80 |
- rb_raise(c_bad_version_operator_error, dynamic_cast<const paludis::BadVersionOperatorError *>(&ee)->message().c_str()); |
81 |
+ rb_raise(c_bad_version_operator_error, "%s", dynamic_cast<const paludis::BadVersionOperatorError *>(&ee)->message().c_str()); |
82 |
|
83 |
else if (0 != dynamic_cast<const paludis::Exception *>(&ee)) |
84 |
rb_raise(rb_eRuntimeError, "Caught paludis::Exception: %s (%s)", |