[DRE-commits] [raspell] 06/13: Add patches to fix format-security issues and add an explicit dictionary for tests
Cédric Boutillier
boutil at moszumanska.debian.org
Wed Jan 15 14:59:50 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository raspell.
commit e7988ca4ffda102d2403f10c68dddb555696409f
Author: Cédric Boutillier <boutil at debian.org>
Date: Wed Jan 15 14:01:36 2014 +0100
Add patches to fix format-security issues and add an explicit dictionary for tests
---
debian/changelog | 6 ++-
debian/patches/fix_test.patch | 16 +++++++
debian/patches/format-security.patch | 84 ++++++++++++++++++++++++++++++++++++
debian/patches/series | 2 +
4 files changed, 106 insertions(+), 2 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index a195814..0b27b7c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,11 +1,13 @@
-raspell (1.3-3) UNRELEASED; urgency=medium
+raspell (1.3-4) UNRELEASED; urgency=medium
*
* Make libraspell-ruby* transitional packages and provide a raspell
binary package
* Build-Depend on aspell-en and Recommends aspell-dictionary
+ * Add patches to fix format-security issues and add an explicit
+ dictionnary for tests
- -- Cédric Boutillier <boutil at debian.org> Wed, 15 Jan 2014 13:54:17 +0100
+ -- Cédric Boutillier <boutil at debian.org> Wed, 15 Jan 2014 14:01:19 +0100
raspell (1.2-2) unstable; urgency=low
diff --git a/debian/patches/fix_test.patch b/debian/patches/fix_test.patch
new file mode 100644
index 0000000..e36b0d3
--- /dev/null
+++ b/debian/patches/fix_test.patch
@@ -0,0 +1,16 @@
+Description: mention an explicit dictionary for the tests
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: no
+Last-Update: 2014-01-15
+
+--- a/test/simple_test.rb
++++ b/test/simple_test.rb
+@@ -6,7 +6,7 @@
+ class TestSpell < Test::Unit::TestCase
+
+ def setup
+- @aspell = Aspell.new
++ @aspell = Aspell.new("en")
+ @text = ["Hiere is somthing wrong on the planett. And it was not the Apollo."]
+ end
+
diff --git a/debian/patches/format-security.patch b/debian/patches/format-security.patch
new file mode 100644
index 0000000..9175a9b
--- /dev/null
+++ b/debian/patches/format-security.patch
@@ -0,0 +1,84 @@
+Description: fix format-security warning/errors
+Author: Cédric Boutillier <boutil at debian.org>
+Forwarded: no
+Last-Update: 2014-01-15
+
+--- a/ext/raspell.c
++++ b/ext/raspell.c
+@@ -73,7 +73,7 @@
+ */
+ static void check_for_error(AspellSpeller * speller) {
+ if (aspell_speller_error(speller) != 0) {
+- rb_raise(cAspellError, aspell_speller_error_message(speller));
++ rb_raise(cAspellError, "%s", aspell_speller_error_message(speller));
+ }
+ }
+
+@@ -87,11 +87,11 @@
+ static void set_option(AspellConfig *config, char *key, char *value) {
+ //printf("set option: %s = %s\n", key, value);
+ if (aspell_config_replace(config, key, value) == 0) {
+- rb_raise(cAspellError, aspell_config_error_message(config));
++ rb_raise(cAspellError, "%s", aspell_config_error_message(config));
+ }
+ //check config:
+ if (aspell_config_error(config) != 0) {
+- rb_raise(cAspellError, aspell_config_error_message(config));
++ rb_raise(cAspellError, "%s", aspell_config_error_message(config));
+ }
+ }
+
+@@ -132,7 +132,7 @@
+ AspellDocumentChecker * checker;
+ ret = new_aspell_document_checker(speller);
+ if (aspell_error(ret) != 0)
+- rb_raise(cAspellError, aspell_error_message(ret));
++ rb_raise(cAspellError, "%s", aspell_error_message(ret));
+ checker = to_aspell_document_checker(ret);
+ return checker;
+ }
+@@ -214,7 +214,7 @@
+ if (aspell_error(ret) != 0) {
+ tmp = strdup(aspell_error_message(ret));
+ delete_aspell_can_have_error(ret);
+- rb_raise(cAspellError, tmp);
++ rb_raise(cAspellError, "%s", tmp);
+ }
+
+ speller = to_aspell_speller(ret);
+@@ -253,7 +253,7 @@
+ if (aspell_error(ret) != 0) {
+ const char *tmp = strdup(aspell_error_message(ret));
+ delete_aspell_can_have_error(ret);
+- rb_raise(cAspellError, tmp);
++ rb_raise(cAspellError, "%s", tmp);
+ }
+
+ speller = to_aspell_speller(ret);
+@@ -409,7 +409,7 @@
+ AspellConfig *config = aspell_speller_config(speller);
+ VALUE result = rb_str_new2(aspell_config_retrieve(config, StringValuePtr(key)));
+ if (aspell_config_error(config) != 0) {
+- rb_raise(cAspellError, aspell_config_error_message(config));
++ rb_raise(cAspellError, "%s", aspell_config_error_message(config));
+ }
+ return result;
+ }
+@@ -433,7 +433,7 @@
+ if (aspell_config_error(config) != 0) {
+ char *tmp = strdup(aspell_config_error_message(config));
+ delete_aspell_string_list(list);
+- rb_raise( cAspellError, tmp);
++ rb_raise( cAspellError, "%s", tmp);
+ }
+
+ //iterate over list
+@@ -480,7 +480,7 @@
+ else if (code == 0)
+ result = Qfalse;
+ else
+- rb_raise( cAspellError, aspell_speller_error_message(speller));
++ rb_raise( cAspellError, "%s", aspell_speller_error_message(speller));
+ return result;
+ }
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d68d841
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1,2 @@
+format-security.patch
+fix_test.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/raspell.git
More information about the Pkg-ruby-extras-commits
mailing list