summaryrefslogtreecommitdiffstats
path: root/src/H5B2.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2005-03-08 21:30:21 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2005-03-08 21:30:21 (GMT)
commit0be2fb3aa3ef60a741bd453ad37473a1a1ad4102 (patch)
tree6b66b7a6b46d8ed40670249b85bab158c8b989e0 /src/H5B2.c
parent7f884850250ee587b17eda0bbbde105202098e30 (diff)
downloadhdf5-0be2fb3aa3ef60a741bd453ad37473a1a1ad4102.zip
hdf5-0be2fb3aa3ef60a741bd453ad37473a1a1ad4102.tar.gz
hdf5-0be2fb3aa3ef60a741bd453ad37473a1a1ad4102.tar.bz2
[svn-r10169] Purpose:
Bug fix Description: Correct minor array bounds read error of 0 bytes that purify found. Platforms tested: FreeBSD 4.11 (sleipnir) Solaris 2.9 (shanti)
Diffstat (limited to 'src/H5B2.c')
-rw-r--r--src/H5B2.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5B2.c b/src/H5B2.c
index a1fdaa1..48385a3 100644
--- a/src/H5B2.c
+++ b/src/H5B2.c
@@ -3328,7 +3328,8 @@ H5B2_remove_leaf(H5F_t *f, hid_t dxpl_id, H5RC_t *bt2_shared,
if(leaf->nrec > 0) {
/* Pack record out of leaf */
- HDmemmove(H5B2_LEAF_NREC(leaf,shared,idx),H5B2_LEAF_NREC(leaf,shared,idx+1),shared->type->nrec_size*(leaf->nrec-idx));
+ if(idx<leaf->nrec)
+ HDmemmove(H5B2_LEAF_NREC(leaf,shared,idx),H5B2_LEAF_NREC(leaf,shared,idx+1),shared->type->nrec_size*(leaf->nrec-idx));
} /* end if */
else {
/* Release space for B-tree node on disk */