summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2001-12-11 18:26:40 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2001-12-11 18:26:40 (GMT)
commit3baaa562ee650b7c5062c747cab425cd80ab53e0 (patch)
treed90e869acae6fb2cf001bf3a50d224dd50e7f7ef /src
parent43c1f21316556ae6ac898061a49194270d7e9d8b (diff)
downloadhdf5-3baaa562ee650b7c5062c747cab425cd80ab53e0.zip
hdf5-3baaa562ee650b7c5062c747cab425cd80ab53e0.tar.gz
hdf5-3baaa562ee650b7c5062c747cab425cd80ab53e0.tar.bz2
[svn-r4693] Purpose:
Bug Fix Description: The code in H5Sselect_hyperslab_valid contained an fencepost error and is allowing selections which overlap the extent by exactly one element in any dimension to pass as valid instead of flagging the selection as invalid. This bug only affects hyperslabs which have been OR'ed together, not the selection from a single H5Sselect_hyperslab. This fixes bug #550. Solution: Changed an '>' to an '>=' and added new regression test to check for error. Platforms tested: FreeBSD 4.4 (sleipnir)
Diffstat (limited to 'src')
-rw-r--r--src/H5Shyper.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Shyper.c b/src/H5Shyper.c
index 809f7e3..8be16e9 100644
--- a/src/H5Shyper.c
+++ b/src/H5Shyper.c
@@ -4994,9 +4994,9 @@ H5S_hyper_select_valid_helper (const H5S_hyper_span_info_t *spans, const hssize_
while(curr!=NULL && ret_value==TRUE) {
/* Check if an offset has been defined */
/* Bounds check the selected point + offset against the extent */
- if(((curr->low+offset[rank])>(hssize_t)size[rank])
+ if(((curr->low+offset[rank])>=(hssize_t)size[rank])
|| ((curr->low+offset[rank])<0)
- || ((curr->high+offset[rank])>(hssize_t)size[rank])
+ || ((curr->high+offset[rank])>=(hssize_t)size[rank])
|| ((curr->high+offset[rank])<0)) {
ret_value=FALSE;
break;