|
FhSim
3.1.0
Marine systems simulation
|
| ID | 0069 |
| Class | BUG |
| Severity | 3 |
| Status | ready |
| Models | Net/NetStructureABAQUS |
| Found | 2026-09-25, independent review of the MARE-0005 documentation (a1e7260) |
The class compiles only when WIN32 is defined (src/net/CMakeLists.txt:8), so none of this can be built or tested on Linux; see MARE-0031.
(1) src/net/Test/NetStructureSpecABAQUS.cpp:17-23 builds and checks fullPath, then passes the directory:
(2) GetABAQUSPart (src/net/Test/NetStructureSpecABAQUS.h:51) returns m_parts[partNr] with no bounds check, and NetStructureABAQUS.cpp:20 calls it with 0 unconditionally, so an input file with no part (or the directory of (1)) indexes an empty container.
(3) NetStructureSpecABAQUS.cpp:217:
reads tokens[1] exactly when there is at most one token. :219 reads tokens[1] when there may be only one token too.
The class cannot read any ABAQUS file as written: it opens the directory, finds no part, and reads out of bounds. With (1) fixed, a malformed file or a one-token line still gives undefined behaviour instead of an error.
(1) ReadAbaqusInputFile(fullPath.string()). (2) Report an error when m_parts is empty. (3) tokens.size() > 1 && tokens[1] == "LOADS" (the intended test), and the same size check at :219.
On Windows, load a minimal ABAQUS file with one part and check the node count. See MARE-0031.
None for valid input: today no valid input can be read.