]> git.pld-linux.org Git - packages/ruby-mongrel.git/commitdiff
- fix format string errors auto/th/ruby-mongrel-1.1.5-5
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 26 Jan 2014 12:17:21 +0000 (13:17 +0100)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 26 Jan 2014 12:17:21 +0000 (13:17 +0100)
format-security.patch [new file with mode: 0644]
ruby-mongrel.spec

diff --git a/format-security.patch b/format-security.patch
new file mode 100644 (file)
index 0000000..94e2c4f
--- /dev/null
@@ -0,0 +1,11 @@
+--- ruby-mongrel-1.1.5/ext/http11/http11.c~    2014-01-26 13:13:47.000000000 +0100
++++ ruby-mongrel-1.1.5/ext/http11/http11.c     2014-01-26 13:15:20.786156849 +0100
+@@ -44,7 +44,7 @@
+ #define DEF_MAX_LENGTH(N,length) const size_t MAX_##N##_LENGTH = length; const char *MAX_##N##_LENGTH_ERR = "HTTP element " # N  " is longer than the " # length " allowed length."
+ /** Validates the max length of given input and throws an HttpParserError exception if over. */
+-#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise(eHttpParserError, MAX_##N##_LENGTH_ERR); }
++#define VALIDATE_MAX_LENGTH(len, N) if(len > MAX_##N##_LENGTH) { rb_raise("%s", eHttpParserError, MAX_##N##_LENGTH_ERR); }
+ /** Defines global strings in the init method. */
+ #define DEF_GLOBAL(N, val)   global_##N = rb_obj_freeze(rb_str_new2(val)); rb_global_variable(&global_##N)
index 5bb379a4f81f493422bf213b7a6c4c796e49bc1d..ac2e33f848e4d22cc164a70ebc43a079b6a41352 100644 (file)
@@ -10,10 +10,12 @@ Source0:    http://gems.rubyforge.org/gems/%{pkgname}-%{version}.gem
 # Source0-md5: a37617eb48f0932cc32143b2d76c0d12
 Patch0:                %{name}-nogems.patch
 Patch1:                %{name}-ruby1.9.patch
+Patch2:                format-security.patch
 URL:           http://mongrel.rubyforge.org/
 BuildRequires: dos2unix
 BuildRequires: rpmbuild(macros) >= 1.277
 BuildRequires: ruby-devel
+BuildRequires: ruby-irb
 BuildRequires: ruby-modules
 %{?ruby_mod_ver_requires_eq}
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -55,6 +57,7 @@ find -newer README  -o -print | xargs touch --reference %{SOURCE0}
 dos2unix examples/mongrel_simple_service.rb
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 find -name '*.rb' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
 
This page took 0.169798 seconds and 4 git commands to generate.