summaryrefslogtreecommitdiffstats
path: root/src/H5Z.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-06-25 18:58:51 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-06-25 18:58:51 (GMT)
commitf5fddfb7c1d055085b0bcf785f1124f69d63c475 (patch)
treecb03c6b7349c206b5b58ebd6da0ace7fc8d2820d /src/H5Z.c
parentc76a57f55705831ce7be4b606a8feacf055cc073 (diff)
downloadhdf5-f5fddfb7c1d055085b0bcf785f1124f69d63c475.zip
hdf5-f5fddfb7c1d055085b0bcf785f1124f69d63c475.tar.gz
hdf5-f5fddfb7c1d055085b0bcf785f1124f69d63c475.tar.bz2
[svn-r17109] Purpose: Fix bug in H5Z_filter_info
Description: Previously, when H5Z_filter_info was called for a filter that was not present, it would succeed and return the information from one position past the end of the pipeline, possibly causing a segfault. This affected at least H5Pget_fitler_by_id1/2, and possibly other API functions. Fixed to properly return failure. Tested: jam, linew, smirom (h5committest)
Diffstat (limited to 'src/H5Z.c')
-rw-r--r--src/H5Z.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Z.c b/src/H5Z.c
index 417ae77..1c58ab0 100644
--- a/src/H5Z.c
+++ b/src/H5Z.c
@@ -1115,7 +1115,7 @@ H5Z_filter_info(const H5O_pline_t *pline, H5Z_filter_t filter)
break;
/* Check if the filter was not already in the pipeline */
- if(idx>pline->nused)
+ if(idx>=pline->nused)
HGOTO_ERROR(H5E_PLINE, H5E_NOTFOUND, NULL, "filter not in pipeline")
/* Set return value */