- RifEclipseOutputFileTools::timeSteps: avoid integer division by zero when
the restart file has no INTEHEAD
- libecl ecl_grid: return NULL when the main EGRID grid cannot be created,
and skip NNCHEAD blocks that cannot be read
- libecl well_info: skip wells when the restart header cannot be read
- cvf::Frustum::isOutside: do not assert on an incomplete frustum, cull nothing
Fixes#14901.
* Fail gracefully when exportSnapshots command has no main window
* Guard against unopened plot panels in selection change handler
* Guard ecl_rsthead_alloc against missing INTEHEAD_KW
* Guard against detached flow diag solution in solverInterface
* Never rewrite all crash-triage reports when updating registry
Reject null buffers and negative buffer sizes up front, returning false instead of risking a null dereference or hitting util_abort. The buffer-overflow protection from the upstream fix is already present via #14144; these two input-validation guards are the remaining delta.
ecl_kw_fread_alloc() returns NULL if a keyword cannot be read, e.g. when
the backing file is truncated or corrupt. ecl_file_kw_load_kw() then
called ecl_file_kw_assert_kw() unconditionally, which dereferenced the
NULL keyword and caused a SIGSEGV.
Guard the assert and inv-map registration so they only run when the read
succeeded. The NULL keyword is propagated to the calling scope, which
already handles a missing keyword gracefully.
A truncated or corrupt restart file could provide a Fortran record-length header larger than the destination buffer, causing fortio_fread_record to fread past the heap allocation and crash. Bound each record read to the remaining buffer capacity and treat an oversized record as a read failure, which propagates up as a normal failed read instead of a segfault.
Guard zero-length keywords in ecl_kw_max_min, increase grdecl buffer to 256 and bound sscanf widths, and validate dimensions and keyword sizes (COORD, ZCORN, MAPAXES, CORSNUM, ACTNUM) when loading GRDECL grids.
Add NULL stream guards in fortio_ftell and fortio_fseek__ to prevent SIGSEGV when fortio->stream is NULL during ecl_file_scan. This mirrors
the defensive fix applied to ESmry::loadData for UNSMRY files.
The function `well_state_add_MSW2` in `well_state.cpp` would allocate
an `ecl_rsthead_type` object but would not free it in the case where
the `RSEG_KW` keyword was not found in the restart file view.
This would lead to a memory leak.
This commit fixes the issue by freeing the allocated object before
returning from the function in the error case.
* Update opm-common EGRID reader to support LGRs, NNCs, dual porosity, unit system info and time step filters
* Rearrange well reading code into separate class
* Update resdata library to not require an ecl_grid when reading well information. Only lgr names are needed, allows reused by opm_common reader
Importing files with different casing in base name and extension would fail when
using libecl summary reader. E.g "norne_atw2013.SMSPEC" would fail since libecl
forces the extension to be lower case even though it is given the actual extension.
Removing the lowercasing allows more flexibility in the file naming.
The problem only occurs when the libecl summary reader is used, the opm-common
can already import these files.
Fixes#10720.
Fixes#10617.
- remove the gsl::not_null for pointer to curve data
- For summary cases linked to a grid model case, do not try to read the original location of file if grid file location is not valid (will happen when a project file is moved)
Earlier attempts to fix this caused major performance issues. Now closing the file stream when reading of vector data is completed, seems to work as expected.