This is an automated email from the git hooks/post-receive script. gregoa pushed a commit to branch master in repository libboost-geometry-utils-perl.
commit 59c27dac1d4a55d85481c620c212fcb67f715daf Author: gregor herrmann <gre...@debian.org> Date: Mon Jun 30 19:58:13 2014 +0200 Add patch from Niko Tyni to extend array in multi_linestring2perl only if needed. Closes: #750224 --- ...tring2perl-only-extend-the-array-if-neede.patch | 34 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 35 insertions(+) diff --git a/debian/patches/0001-multi_linestring2perl-only-extend-the-array-if-neede.patch b/debian/patches/0001-multi_linestring2perl-only-extend-the-array-if-neede.patch new file mode 100644 index 0000000..cbcce38 --- /dev/null +++ b/debian/patches/0001-multi_linestring2perl-only-extend-the-array-if-neede.patch @@ -0,0 +1,34 @@ +From a46f0e41056b48a56c572fe8884d4b5104a8343e Mon Sep 17 00:00:00 2001 +From: Niko Tyni <nt...@debian.org> +Date: Sun, 29 Jun 2014 21:51:15 +0300 +Subject: [PATCH] multi_linestring2perl: only extend the array if needed + +When the size is 0, we end up extending the stack with +a negative value. As of Perl 5.19.4, more precisely + http://perl5.git.perl.org/perl.git/commit/fc16c3924bd6aa054f21ad5445fecf9b7f39dc36 +this ends up allocating memory for 4G-1 elements. + +See Dave Mitchell's comments on perl5-porters: + Message-ID: <20140522115758.gx15...@iabyn.com> + http://marc.info/?l=perl5-porters&m=140075990913228&w=2 +--- + src/mline2av.h | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/src/mline2av.h b/src/mline2av.h +index e4b3fc2..d7bacee 100644 +--- a/src/mline2av.h ++++ b/src/mline2av.h +@@ -9,7 +9,8 @@ multi_linestring2perl(pTHX_ const multi_linestring& mls) + { + AV* av = newAV(); + const unsigned int size = mls.size(); +- av_extend(av, size-1); ++ if (size > 0) ++ av_extend(av, size-1); + + for (int i = 0; i < size; i++) { + AV* lineav = newAV(); +-- +2.0.0 + diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..697c582 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1 @@ +0001-multi_linestring2perl-only-extend-the-array-if-neede.patch -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libboost-geometry-utils-perl.git _______________________________________________ Pkg-perl-cvs-commits mailing list Pkg-perl-cvs-commits@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-perl-cvs-commits