#14895: Improve stability when importing malformed input files

* #14895: Fix null grid dereference when importing mismatching GRDECL
* #14895: Fix out-of-bounds read in perforation interval import
* #14895: Validate connectivity indices in VTK import
* #14895: Fix heap overflow for odd PORV count in dual porosity cases
* #14895: Update roffcpp to validate array lengths when parsing ROFF files
This commit is contained in:
Magne Sjaastad authored and GitHub committed 2026-10-12 09:40:23 +02:00
1 parent 780af47317
commit ab96c520bd
10 files changed
+208 -6

No files matched your search

@@ -33,6 +33,7 @@
#include <QString>
#include <algorithm>
#include <map>
namespace RifVtkFieldNames
@@ -292,6 +293,11 @@ std::expected<RigElementType, std::string>
std::vector<unsigned> connectivity = RifVtkImportUtil::readConnectivity( piece );
if ( connectivity.empty() ) return std::unexpected( "No connectivity found: " + d.filepath.string() );
if ( std::ranges::any_of( connectivity, [&vertices]( unsigned index ) { return index >= vertices.size(); } ) )
{
return std::unexpected( "Connectivity refers to a point that does not exist: " + d.filepath.string() );
}
std::vector<std::pair<int, cvf::Vec3d>> partNodes;
for ( int i = 0; i < static_cast<int>( vertices.size() ); i++ )
{