]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Add extra check for index range. 14024/head
authorMartin Kronbichler <martin.kronbichler@uni-a.de>
Fri, 24 Jun 2022 14:20:19 +0000 (16:20 +0200)
committerGitHub <noreply@github.com>
Fri, 24 Jun 2022 14:20:19 +0000 (16:20 +0200)
Co-authored-by: David Wells <drwells@email.unc.edu>
include/deal.II/multigrid/mg_transfer_global_coarsening.templates.h

index ce3c49bebcc8c369d7a580e2f23bd4531f1af054..56b90bb3448f9840f0fa9d96764623044472ab45 100644 (file)
@@ -739,8 +739,11 @@ namespace internal
                   dof_handler_fine.get_fe(buffer[i]).n_dofs_per_cell();
                 ++i;
                 for (unsigned int j = 0; j < dofs_per_cell; ++j, ++i)
-                  if (!is_extended_locally_owned.is_element(buffer[i]))
-                    ghost_indices.push_back(buffer[i]);
+                  {
+                    AssertIndexRange(i, buffer.size());
+                    if (!is_extended_locally_owned.is_element(buffer[i]))
+                      ghost_indices.push_back(buffer[i]);
+                  }
               }
 
             const unsigned int rank = status.MPI_SOURCE;

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.