diff options
author | tradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035> | 2005-05-10 15:37:58 +0000 |
---|---|---|
committer | tradke <tradke@10716dce-81a3-4424-a2c8-48026a0d3035> | 2005-05-10 15:37:58 +0000 |
commit | 16cf082eb78ed3bd7da621b750a6ac937801a960 (patch) | |
tree | 39f63244c49bf666fcd6d6788ae429169e2b2906 | |
parent | c5a7c0ba35f5d6f8eb544f7810a3e2a1490cf056 (diff) |
Fix out-of-bounds array access for extent vector in
Hyperslab_GlobalMappingByIndex().
This closes PR CactusBase/1926: "IOASCII uses uninitialised values for
hyperslabbing".
git-svn-id: http://svn.cactuscode.org/arrangements/CactusPUGH/PUGHSlab/trunk@137 10716dce-81a3-4424-a2c8-48026a0d3035
-rw-r--r-- | src/Mapping.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Mapping.c b/src/Mapping.c index 96b8846..d0ebc42 100644 --- a/src/Mapping.c +++ b/src/Mapping.c @@ -368,7 +368,7 @@ static CCTK_INT DefineMapping (const cGH *GH, real_extent = malloc (vinfo.dim * sizeof (CCTK_INT)); for (vdim = dim = 0; vdim < vinfo.dim; vdim++) { - real_extent[vdim] = extent[vdim]; + real_extent[vdim] = vdim < hdim ? extent[vdim] : -1; if (real_extent[vdim] < 0) { real_extent[vdim] = extras->nsize[vdim]; |