diff options
author | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-01-22 17:15:21 (GMT) |
---|---|---|
committer | Mohamad Chaarawi <chaarawi@hdfgroup.org> | 2015-01-22 17:15:21 (GMT) |
commit | 5eee1d7d7e352d90e0350f235b8066550a51f19b (patch) | |
tree | 5985bea338d90789ea6a3992b7c7171b7e4890b1 /src/H5FDstdio.c | |
parent | a24e3e5c8669fd205b75d264ca44e23fc1bfc651 (diff) | |
download | hdf5-5eee1d7d7e352d90e0350f235b8066550a51f19b.zip hdf5-5eee1d7d7e352d90e0350f235b8066550a51f19b.tar.gz hdf5-5eee1d7d7e352d90e0350f235b8066550a51f19b.tar.bz2 |
[svn-r26002] move checks on reading/writing beyond file eoa outside of the file drivers and into a centralized place in H5FD_read/write.
tested h5committest.
Diffstat (limited to 'src/H5FDstdio.c')
-rw-r--r-- | src/H5FDstdio.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c index c02e96d..8611ab0 100644 --- a/src/H5FDstdio.c +++ b/src/H5FDstdio.c @@ -799,8 +799,6 @@ H5FD_stdio_read(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, siz H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) if (REGION_OVERFLOW(addr, size)) H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) - if((addr + size) > file->eoa) - H5Epush_ret(func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) /* Check easy cases */ if (0 == size) @@ -906,8 +904,6 @@ H5FD_stdio_write(H5FD_t *_file, H5FD_mem_t type, hid_t dxpl_id, haddr_t addr, H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) if (REGION_OVERFLOW(addr, size)) H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) - if (addr+size > file->eoa) - H5Epush_ret (func, H5E_ERR_CLS, H5E_IO, H5E_OVERFLOW, "file address overflowed", -1) /* Seek to the correct file position. */ if ((file->op != H5FD_STDIO_OP_WRITE && file->op != H5FD_STDIO_OP_SEEK) || |