From: Timo Heister Date: Thu, 7 Jul 2022 18:37:59 +0000 (-0400) Subject: add error checks X-Git-Tag: v9.5.0-rc1~1100^2~6 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9d39abad4b3919b09c8d7215a65dc807747f70d3;p=dealii.git add error checks --- diff --git a/source/base/data_out_base.cc b/source/base/data_out_base.cc index 1e4339bb02..bc0710b3df 100644 --- a/source/base/data_out_base.cc +++ b/source/base/data_out_base.cc @@ -9255,6 +9255,14 @@ DataOutReader::read_whole_parallel_file(std::istream &in) ParallelIntermediateHeaderType header; in.read(reinterpret_cast(&header), sizeof(header)); + AssertThrow( + header.magic == 0x00dea111, + ExcMessage( + "Invalid header of parallel deal.II intermediate format encountered.")); + AssertThrow( + header.version == DataOutBase::Deal_II_IntermediateFlags::format_version, + ExcMessage( + "Incorrect header version of parallel deal.II intermediate format.")); std::vector chunk_sizes(header.num_ranks); in.read(reinterpret_cast(chunk_sizes.data()),