diff options
author | mattjala <124107509+mattjala@users.noreply.github.com> | 2023-04-11 20:22:11 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-11 20:22:11 (GMT) |
commit | 2eedc8e8f7c4d70829c6afd5a048fb38f50917c6 (patch) | |
tree | bc7100fe6691d073cb4044efb42ef81ccfc39f29 /src/H5private.h | |
parent | bc8fa3a477e46d1fd3661666e4de79f455d41e19 (diff) | |
download | hdf5-2eedc8e8f7c4d70829c6afd5a048fb38f50917c6.zip hdf5-2eedc8e8f7c4d70829c6afd5a048fb38f50917c6.tar.gz hdf5-2eedc8e8f7c4d70829c6afd5a048fb38f50917c6.tar.bz2 |
Fix invalid memory access in H5O__ginfo_decode (#2663)
Diffstat (limited to 'src/H5private.h')
-rw-r--r-- | src/H5private.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/H5private.h b/src/H5private.h index eb7d8e0..d92f7f6 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -2436,6 +2436,11 @@ H5_DLL herr_t H5CX_pop(hbool_t update_dxpl_props); #define HDcompile_assert(e) do { typedef struct { unsigned int b: (e); } x; } while(0) */ +/* Check if a read of size bytes starting at ptr would overflow past + * the last valid byte, pointed to by buffer_end . + */ +#define H5_IS_BUFFER_OVERFLOW(ptr, size, buffer_end) (((ptr) + (size)-1) > (buffer_end)) + /* Private typedefs */ /* Union for const/non-const pointer for use by functions that manipulate |