summaryrefslogtreecommitdiffstats
path: root/src/H5S.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/H5S.c')
-rw-r--r--src/H5S.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/H5S.c b/src/H5S.c
index 22de41f..c938a71 100644
--- a/src/H5S.c
+++ b/src/H5S.c
@@ -1655,9 +1655,10 @@ H5S_decode(const unsigned char **p)
if (H5S_select_all(ds, FALSE) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTSET, NULL, "unable to set all selection")
- /* Decode the select part of dataspace. I believe this part always exists. */
+ /* Decode the select part of dataspace.
+ * Because size of buffer is unknown, assume arbitrarily large buffer to allow decoding. */
*p = pp;
- if (H5S_SELECT_DESERIALIZE(&ds, p) < 0)
+ if (H5S_SELECT_DESERIALIZE(&ds, p, SIZE_MAX) < 0)
HGOTO_ERROR(H5E_DATASPACE, H5E_CANTDECODE, NULL, "can't decode space selection")
/* Set return value */