mirror of
https://github.com/NGSolve/netgen.git
synced 2025-02-15 23:03:11 +05:00
Fix nullptr deref in archive
Hardened toolchains (eg, mainline Fedora) no longer tolerate null derefs that were silently trapped/ignored in earlier versions. This eliminates a nullptr deref in archive.hpp that was failing several unit tests (and causing crashes) when trying to manipulate default-constructed archive objects.
This commit is contained in:
parent
97d3c1ce9e
commit
5ee4e43393
@ -225,6 +225,7 @@ namespace ngcore
|
||||
(*this) & size;
|
||||
if(Input())
|
||||
v.resize(size);
|
||||
if(size > 0) // can't deref v[0] if it doesn't exist
|
||||
Do(&v[0], size);
|
||||
return (*this);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user