summaryrefslogtreecommitdiffstats
path: root/src/H5Sprivate.h
diff options
context:
space:
mode:
authormattjala <124107509+mattjala@users.noreply.github.com>2023-05-18 16:13:34 (GMT)
committerGitHub <noreply@github.com>2023-05-18 16:13:34 (GMT)
commit8dcc7dc17ff4e797edc5570a6eaa1d8da691b97e (patch)
tree53b1f43c643978533a0e679aa07a8169f4367ee0 /src/H5Sprivate.h
parentd5143567c8f08f6f6de80ffcffa3ede98634ca78 (diff)
downloadhdf5-8dcc7dc17ff4e797edc5570a6eaa1d8da691b97e.zip
hdf5-8dcc7dc17ff4e797edc5570a6eaa1d8da691b97e.tar.gz
hdf5-8dcc7dc17ff4e797edc5570a6eaa1d8da691b97e.tar.bz2
Prevent buffer overrun in H5S_select_deserialize (#2956)
Diffstat (limited to 'src/H5Sprivate.h')
-rw-r--r--src/H5Sprivate.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/H5Sprivate.h b/src/H5Sprivate.h
index db627fb..c2fd224 100644
--- a/src/H5Sprivate.h
+++ b/src/H5Sprivate.h
@@ -190,7 +190,7 @@ typedef struct H5S_sel_iter_op_t {
#define H5S_SELECT_SHAPE_SAME(S1, S2) (H5S_select_shape_same(S1, S2))
#define H5S_SELECT_INTERSECT_BLOCK(S, START, END) (H5S_select_intersect_block(S, START, END))
#define H5S_SELECT_RELEASE(S) (H5S_select_release(S))
-#define H5S_SELECT_DESERIALIZE(S, BUF) (H5S_select_deserialize(S, BUF))
+#define H5S_SELECT_DESERIALIZE(S, BUF, BUF_SIZE) (H5S_select_deserialize(S, BUF, BUF_SIZE))
/* Forward declaration of structs used below */
struct H5O_t;
@@ -229,7 +229,7 @@ H5_DLL htri_t H5S_extent_equal(const H5S_t *ds1, const H5S_t *ds2);
H5_DLL herr_t H5S_extent_copy(H5S_t *dst, const H5S_t *src);
/* Operations on selections */
-H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p);
+H5_DLL herr_t H5S_select_deserialize(H5S_t **space, const uint8_t **p, const size_t p_size);
H5_DLL H5S_sel_type H5S_get_select_type(const H5S_t *space);
H5_DLL herr_t H5S_select_iterate(void *buf, const H5T_t *type, H5S_t *space, const H5S_sel_iter_op_t *op,
void *op_data);