[DRE-commits] [ruby-posix-spawn] 01/01: Avoid use PATH_MAX (Closes: #750452), Thanks to Svante Signell!

Youhei SASAKI uwabami-guest at moszumanska.debian.org
Tue Jun 3 17:07:05 UTC 2014


This is an automated email from the git hooks/post-receive script.

uwabami-guest pushed a commit to annotated tag debian/0.3.8-2
in repository ruby-posix-spawn.

commit 0b4c5fb4d23d84da1ea0f275c80beb1ec0dfd383
Author: Youhei SASAKI <uwabami at gfd-dennou.org>
Date:   Wed Jun 4 02:05:07 2014 +0900

    Avoid use PATH_MAX (Closes: #750452), Thanks to Svante Signell!
    
    Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
---
 debian/changelog                                   |  7 ++++++
 .../0001-Avoid-using-PATH_MAX-for-GNU-Hurd.patch   | 29 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 37 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index b370ed8..a66ee24 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+ruby-posix-spawn (0.3.8-2) unstable; urgency=medium
+
+  * Avoid use PATH_MAX (Closes: #750452)
+    Thanks to Svante Signell!
+
+ -- Youhei SASAKI <uwabami at gfd-dennou.org>  Wed, 04 Jun 2014 02:05:46 +0900
+
 ruby-posix-spawn (0.3.8-1) unstable; urgency=medium
 
   [ Cédric Boutillier ]
diff --git a/debian/patches/0001-Avoid-using-PATH_MAX-for-GNU-Hurd.patch b/debian/patches/0001-Avoid-using-PATH_MAX-for-GNU-Hurd.patch
new file mode 100644
index 0000000..b9b28f8
--- /dev/null
+++ b/debian/patches/0001-Avoid-using-PATH_MAX-for-GNU-Hurd.patch
@@ -0,0 +1,29 @@
+From: Youhei SASAKI <uwabami at gfd-dennou.org>
+Date: Wed, 4 Jun 2014 01:57:22 +0900
+Subject: Avoid using PATH_MAX for GNU/Hurd
+Origin: Svante Signell <svante.signell at gmail.com>
+
+Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
+---
+ ext/posix-spawn.c | 8 ++++++--
+ 1 file changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/ext/posix-spawn.c b/ext/posix-spawn.c
+index 501423d..9fb22dc 100644
+--- a/ext/posix-spawn.c
++++ b/ext/posix-spawn.c
+@@ -438,8 +438,12 @@ rb_posixspawn_pspawn(VALUE self, VALUE env, VALUE argv, VALUE options)
+ 	}
+ 
+ 	if (ret != 0) {
+-		char error_context[PATH_MAX+32];
+-		snprintf(error_context, sizeof(error_context), "when spawning '%s'", file);
++		char *error_context = NULL;
++		size_t len = 15 + strlen(file) + 1 + 1;
++		error_context = malloc(len);
++		if (error_context == NULL)
++		  return -1;
++		snprintf(error_context, len, "when spawning '%s'", file);
+ 		errno = ret;
+ 		rb_sys_fail(error_context);
+ 	}
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..e5dc5f2
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+0001-Avoid-using-PATH_MAX-for-GNU-Hurd.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-posix-spawn.git



More information about the Pkg-ruby-extras-commits mailing list