summaryrefslogtreecommitdiffstats
path: root/src/H5Fistore.c
diff options
context:
space:
mode:
authorRobb Matzke <matzke@llnl.gov>1998-08-20 22:57:35 (GMT)
committerRobb Matzke <matzke@llnl.gov>1998-08-20 22:57:35 (GMT)
commit49133159c8bb1da1edf9e89971a842e50b545314 (patch)
treeb1fccecc5be463797bd9bbbb9a7a31b3afcda44a /src/H5Fistore.c
parent2c61dcc3ee50581ca29191f3d7ea891fcca3c4a2 (diff)
downloadhdf5-49133159c8bb1da1edf9e89971a842e50b545314.zip
hdf5-49133159c8bb1da1edf9e89971a842e50b545314.tar.gz
hdf5-49133159c8bb1da1edf9e89971a842e50b545314.tar.bz2
[svn-r609] Debugging.html
Fixed errors H5.c Fixed core dump with setvbuf() for debugging. H5Fistore.c Fixed bug with sparse datasets. H5Omtime.c Found a typo in "Posix Programmer's Guide". The `%z' in the strftime() should be `%Z' instead. H5T.c H5Tpublic.h Improved api tracing for H5Tinsert_array(). h5tools.c Doesn't dump core for empty datasets.
Diffstat (limited to 'src/H5Fistore.c')
-rw-r--r--src/H5Fistore.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/H5Fistore.c b/src/H5Fistore.c
index 94d3590..e94e627 100644
--- a/src/H5Fistore.c
+++ b/src/H5Fistore.c
@@ -471,6 +471,12 @@ H5F_istore_new_node(H5F_t *f, H5B_ins_t op,
* that describes the chunk) and RT_KEY is the right key (the
* one that describes the next or last chunk).
*
+ * Note: It's possible that the chunk isn't really found. For
+ * instance, in a sparse dataset the requested chunk might fall
+ * between two stored chunks in which case this function is
+ * called with the maximum stored chunk indices less than the
+ * requested chunk indices.
+ *
* Return: Success: SUCCEED with information about the chunk
* returned through the UDATA argument.
*
@@ -500,6 +506,13 @@ H5F_istore_found(H5F_t __unused__ *f, const haddr_t *addr,
assert(udata);
assert(lt_key);
+ /* Is this *really* the requested chunk? */
+ for (i=0; i<udata->mesg.ndims; i++) {
+ if (udata->key.offset[i]>=lt_key->offset[i]+udata->mesg.dim[i]) {
+ HRETURN(FAIL);
+ }
+ }
+
/* Initialize return values */
udata->addr = *addr;
udata->key.nbytes = lt_key->nbytes;