diff options
author | Sean McBride <sean@rogue-research.com> | 2024-02-20 17:19:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 17:19:50 (GMT) |
commit | 7aed6abd527e88243a450c7809cde6003de1cb6f (patch) | |
tree | b1fd5656a5922d95f78e211ed75b7bb04b19b2a1 /src/H5Opkg.h | |
parent | f73da83a94f6fe563ff351603aa4d34525ef612b (diff) | |
download | hdf5-7aed6abd527e88243a450c7809cde6003de1cb6f.zip hdf5-7aed6abd527e88243a450c7809cde6003de1cb6f.tar.gz hdf5-7aed6abd527e88243a450c7809cde6003de1cb6f.tar.bz2 |
Replaced last sprintf with snprintf (#4007)
* Replaced last sprintf with snprintf
To have the size of the buffer, it was required to change a function signature, and change all users of it.
In most cases, determining the buffer size wasn't trivial and so SIZE_MAX is passed. But at least this improves the infrastructure. Someone can later figure out the correct sizes.
Diffstat (limited to 'src/H5Opkg.h')
-rw-r--r-- | src/H5Opkg.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/H5Opkg.h b/src/H5Opkg.h index feca86f..4c719bf 100644 --- a/src/H5Opkg.h +++ b/src/H5Opkg.h @@ -211,7 +211,7 @@ struct H5O_msg_class_t { size_t native_size; /*size of native message */ unsigned share_flags; /* Message sharing settings */ void *(*decode)(H5F_t *, H5O_t *, unsigned, unsigned *, size_t, const uint8_t *); - herr_t (*encode)(H5F_t *, bool, uint8_t *, const void *); + herr_t (*encode)(H5F_t *, bool, size_t, uint8_t *, const void *); void *(*copy)(const void *, void *); /*copy native value */ size_t (*raw_size)(const H5F_t *, bool, const void *); /*sizeof encoded message */ herr_t (*reset)(void *); /*free nested data structs */ |