From f0f56c0c0a708812294a6192aa1979efd3ccba6e Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 13 Sep 2002 11:27:09 -0500 Subject: [svn-r5924] Purpose: Code cleanup Description: Switch order of test on array bounds to avoid reading data outside of array Located by purify. Platforms tested: FreeBSD 4.6 (sleipnir) w/C++ Solaris 2.7 (arabica) w/C++ IRIX64 6.5 (modi4) w/parallel & fortran --- src/H5Sselect.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/H5Sselect.c b/src/H5Sselect.c index 70888e8..381e9e0 100644 --- a/src/H5Sselect.c +++ b/src/H5Sselect.c @@ -1237,7 +1237,7 @@ H5S_select_read(H5F_t *f, const H5O_layout_t *layout, H5P_genplist_t *dc_plist, /* Determine how many file sequences will fit into current memory sequence */ tmp_file_len=0; tot_file_seq=0; - while((tmp_file_len+file_len[curr_file_seq])<=mem_len[curr_mem_seq] && curr_file_seq