From 9d39abad4b3919b09c8d7215a65dc807747f70d3 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Thu, 7 Jul 2022 14:37:59 -0400 Subject: [PATCH] add error checks --- source/base/data_out_base.cc | 8 ++++++++ 1 file changed, 8 insertions(+) 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()), -- 2.39.5