From: "Andreas Sturmlechner" <asturm@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/liblas/, sci-geosciences/liblas/files/
Date: Fri, 24 May 2019 19:26:07 +0000 (UTC) [thread overview]
Message-ID: <1558725947.876f39a654bd15c8fe2dbdfcf07bcee2b7d10bf6.asturm@gentoo> (raw)
commit: 876f39a654bd15c8fe2dbdfcf07bcee2b7d10bf6
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri May 24 19:09:44 2019 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri May 24 19:25:47 2019 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=876f39a6
sci-geosciences/liblas: Fix CVE-2018-20540
Bug: https://bugs.gentoo.org/678482
Package-Manager: Portage-2.3.66, Repoman-2.3.12
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../liblas/files/liblas-1.8.1-CVE-2018-20540.patch | 55 ++++++++++++++++++++++
sci-geosciences/liblas/liblas-1.8.1-r2.ebuild | 1 +
2 files changed, 56 insertions(+)
diff --git a/sci-geosciences/liblas/files/liblas-1.8.1-CVE-2018-20540.patch b/sci-geosciences/liblas/files/liblas-1.8.1-CVE-2018-20540.patch
new file mode 100644
index 00000000000..ab2174f04ff
--- /dev/null
+++ b/sci-geosciences/liblas/files/liblas-1.8.1-CVE-2018-20540.patch
@@ -0,0 +1,55 @@
+From 09d45518776489508f34098f1c159f58b856f459 Mon Sep 17 00:00:00 2001
+From: Mateusz Loskot <mateusz@loskot.net>
+Date: Sun, 20 Jan 2019 02:28:29 +0100
+Subject: [PATCH] Ensure stream is deallocated in case of exception (#162)
+
+Fixes #158
+---
+ include/liblas/liblas.hpp | 32 ++++++++++++++++++++++++--------
+ 1 file changed, 24 insertions(+), 8 deletions(-)
+
+diff --git a/include/liblas/liblas.hpp b/include/liblas/liblas.hpp
+index f5ad44e1..325de3ff 100644
+--- a/include/liblas/liblas.hpp
++++ b/include/liblas/liblas.hpp
+@@ -119,16 +119,32 @@ inline std::istream* Open(std::string const& filename, std::ios::openmode mode)
+ {
+ #ifdef USE_BOOST_IO
+ namespace io = boost::iostreams;
+- io::stream<io::file_source>* ifs = new io::stream<io::file_source>();
+- ifs->open(filename.c_str(), mode);
+- if (ifs->is_open() == false) return NULL;
+- return ifs;
++ io::stream<io::file_source>* ifs = NULL;
++ try
++ {
++ ifs = new io::stream<io::file_source>();
++ ifs->open(filename.c_str(), mode);
++ if (ifs->is_open() == false) return NULL;
++ return ifs;
++ }
++ catch (...)
++ {
++ delete ifs;
++ }
+ #else
+- std::ifstream* ifs = new std::ifstream();
+- ifs->open(filename.c_str(), mode);
+- if (ifs->is_open() == false) return NULL;
+- return ifs;
++ std::ifstream* ifs = NULL;
++ try
++ {
++ ifs = new std::ifstream();
++ ifs->open(filename.c_str(), mode);
++ if (ifs->is_open() == false) return NULL;
++ }
++ catch (...)
++ {
++ delete ifs;
++ }
+ #endif
++ return NULL;
+ }
+
+ /// Create file and open to write in binary mode.
diff --git a/sci-geosciences/liblas/liblas-1.8.1-r2.ebuild b/sci-geosciences/liblas/liblas-1.8.1-r2.ebuild
index 11e130b1404..6153260346a 100644
--- a/sci-geosciences/liblas/liblas-1.8.1-r2.ebuild
+++ b/sci-geosciences/liblas/liblas-1.8.1-r2.ebuild
@@ -30,6 +30,7 @@ S="${WORKDIR}/libLAS-${PV}"
PATCHES=(
"${FILESDIR}"/${PN}-1.8.0_remove-std-c++98.patch
"${FILESDIR}"/${P}-fix-overload-call.patch # bug 661654
+ "${FILESDIR}"/${P}-CVE-2018-20540.patch # bug 678482
)
src_prepare() {
next reply other threads:[~2019-05-24 19:26 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-24 19:26 Andreas Sturmlechner [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-02-26 16:56 [gentoo-commits] repo/gentoo:master commit in: sci-geosciences/liblas/, sci-geosciences/liblas/files/ Andreas Sturmlechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1558725947.876f39a654bd15c8fe2dbdfcf07bcee2b7d10bf6.asturm@gentoo \
--to=asturm@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox