Skip to content

Commit

Permalink
Avoid dereferencing a past-the-end iterator
Browse files Browse the repository at this point in the history
  • Loading branch information
kronbichler committed Nov 29, 2021
1 parent 26c4a2a commit 6e4c3c4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/deal.II/base/utilities.h
Original file line number Diff line number Diff line change
Expand Up @@ -1307,7 +1307,7 @@ namespace Utilities
#else
(void)allow_compression;
#endif
fisb.push(boost::iostreams::array_source(&*cbegin, &*cend));
fisb.push(boost::iostreams::array_source(&*cbegin, cend - cbegin));

boost::archive::binary_iarchive bia(fisb);
bia >> object;
Expand Down Expand Up @@ -1355,7 +1355,7 @@ namespace Utilities
#else
(void)allow_compression;
#endif
fisb.push(boost::iostreams::array_source(&*cbegin, &*cend));
fisb.push(boost::iostreams::array_source(&*cbegin, cend - cbegin));

boost::archive::binary_iarchive bia(fisb);
bia >> unpacked_object;
Expand Down

0 comments on commit 6e4c3c4

Please sign in to comment.