diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-01-22 18:14:05 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-01-22 18:14:05 (GMT) |
commit | 643b662d87cc7771b624a1c520d4775fdf225dec (patch) | |
tree | 713b7d9cad96d7fa1cc7d6b76a8dd10014934ee1 /src/H5FDcore.c | |
parent | 65bc4bb9804471fe920bf25608ecea71b5b2d078 (diff) | |
download | hdf5-643b662d87cc7771b624a1c520d4775fdf225dec.zip hdf5-643b662d87cc7771b624a1c520d4775fdf225dec.tar.gz hdf5-643b662d87cc7771b624a1c520d4775fdf225dec.tar.bz2 |
[svn-r26003] merge 26002 from trunk:
move checks on reading/writing beyond file eoa outside of the file drivers and into a centralized place in H5FD_read/write.
tested with h5commitest
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r-- | src/H5FDcore.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c index 7c7dd39..c511977 100644 --- a/src/H5FDcore.c +++ b/src/H5FDcore.c @@ -1223,8 +1223,6 @@ H5FD_core_read(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, hadd HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") if (REGION_OVERFLOW(addr, size)) HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") - if((addr + size) > file->eoa) - HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") /* Read the part which is before the EOF marker */ if (addr < file->eof) { @@ -1283,8 +1281,6 @@ H5FD_core_write(H5FD_t *_file, H5FD_mem_t UNUSED type, hid_t UNUSED dxpl_id, had /* Check for overflow conditions */ if(REGION_OVERFLOW(addr, size)) HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") - if(addr + size > file->eoa) - HGOTO_ERROR(H5E_IO, H5E_OVERFLOW, FAIL, "file address overflowed") /* * Allocate more memory if necessary, careful of overflow. Also, if the |