diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2018-02-27 02:31:40 (GMT) |
---|---|---|
committer | lrknox <lrknox> | 2018-05-10 21:43:47 (GMT) |
commit | b1a6873b1021c967b661727edae9de87d194f744 (patch) | |
tree | 81deb9506f7616af37caeeebaff525b7ef74aa0f /src/H5Omtime.c | |
parent | 11a188a4b6f1da0bd81c54976e6ceb8530d71aa1 (diff) | |
download | hdf5-b1a6873b1021c967b661727edae9de87d194f744.zip hdf5-b1a6873b1021c967b661727edae9de87d194f744.tar.gz hdf5-b1a6873b1021c967b661727edae9de87d194f744.tar.bz2 |
Fix for HDFFV-10355 (CVE-2017-17506).
(cherry picked from commit 302053f978e38a8d4306a7c1233cdf8fd2ec28dd)
Diffstat (limited to 'src/H5Omtime.c')
-rw-r--r-- | src/H5Omtime.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/H5Omtime.c b/src/H5Omtime.c index 46dd499..e4db09b 100644 --- a/src/H5Omtime.c +++ b/src/H5Omtime.c @@ -27,12 +27,12 @@ static void *H5O_mtime_new_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_mtime_new_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static size_t H5O_mtime_new_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); static void *H5O_mtime_decode(H5F_t *f, hid_t dxpl_id, H5O_t *open_oh, - unsigned mesg_flags, unsigned *ioflags, const uint8_t *p); + unsigned mesg_flags, unsigned *ioflags, size_t p_size, const uint8_t *p); static herr_t H5O_mtime_encode(H5F_t *f, hbool_t disable_shared, uint8_t *p, const void *_mesg); static void *H5O_mtime_copy(const void *_mesg, void *_dest); static size_t H5O_mtime_size(const H5F_t *f, hbool_t disable_shared, const void *_mesg); @@ -118,7 +118,8 @@ H5FL_DEFINE(time_t); */ static void * H5O_mtime_new_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { time_t *mesg; uint32_t tmp_time; /* Temporary copy of the time */ @@ -171,7 +172,8 @@ done: */ static void * H5O_mtime_decode(H5F_t H5_ATTR_UNUSED *f, hid_t H5_ATTR_UNUSED dxpl_id, H5O_t H5_ATTR_UNUSED *open_oh, - unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, const uint8_t *p) + unsigned H5_ATTR_UNUSED mesg_flags, unsigned H5_ATTR_UNUSED *ioflags, + size_t H5_ATTR_UNUSED p_size, const uint8_t *p) { time_t *mesg, the_time; int i; |