ports/devel/liblas/files/patch-CVE-2018-20540-fixup
Dima Panov 969f058c9c devel/liblas: unbreak build after recent boost upgrade (+)
While here, backport critical security and compatibility fixes from upstream

PR:		246106
Security:	CVE-2018-20540
2022-05-24 13:57:55 +03:00

24 lines
893 B
Text

From 6a666b9101293b13fde4e4eb1d2c627f7613515e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Felipe=20M=2E=20L=C3=B3pez?= <femulop@gmail.com>
Date: Fri, 19 Jul 2019 08:26:44 +0200
Subject: [PATCH] Always return NULL when Open() is used (#168)
Attempt to open LAS file using standard stream, without
Boost supports built in, always failed with
"Cannot open sample.las for read. Exiting..."
---
include/liblas/liblas.hpp | 1 +
1 file changed, 1 insertion(+)
diff --git include/liblas/liblas.hpp include/liblas/liblas.hpp
index 325de3ff..5c950ce0 100644
--- include/liblas/liblas.hpp
+++ include/liblas/liblas.hpp
@@ -138,6 +138,7 @@ inline std::istream* Open(std::string const& filename, std::ios::openmode mode)
ifs = new std::ifstream();
ifs->open(filename.c_str(), mode);
if (ifs->is_open() == false) return NULL;
+ return ifs;
}
catch (...)
{