]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Check that add_indices respects index_space_size 3788/head
authorDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 13 Jan 2017 16:54:27 +0000 (17:54 +0100)
committerDaniel Arndt <daniel.arndt@iwr.uni-heidelberg.de>
Fri, 13 Jan 2017 16:54:27 +0000 (17:54 +0100)
source/base/index_set.cc

index c8efcf2489dd12e1ad8f5321fe4c42975c2149bc..d344745e6e5a8804959c51662441caa9234c3a53 100644 (file)
@@ -393,6 +393,11 @@ IndexSet::add_indices(const IndexSet &other,
   if ((this == &other) && (offset == 0))
     return;
 
+  Assert (other.ranges.size() == 0
+          || other.ranges.back().end-1 < index_space_size,
+          ExcIndexRangeType<size_type> (other.ranges.back().end-1,
+                                        0, index_space_size));
+
   compress();
   other.compress();
 

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.