summaryrefslogtreecommitdiffstats
path: root/src/H5FDstdio.c
diff options
context:
space:
mode:
authorMohamad Chaarawi <chaarawi@hdfgroup.org>2015-01-22 18:14:05 (GMT)
committerMohamad Chaarawi <chaarawi@hdfgroup.org>2015-01-22 18:14:05 (GMT)
commit643b662d87cc7771b624a1c520d4775fdf225dec (patch)
tree713b7d9cad96d7fa1cc7d6b76a8dd10014934ee1 /src/H5FDstdio.c
parent65bc4bb9804471fe920bf25608ecea71b5b2d078 (diff)
downloadhdf5-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/H5FDstdio.c')
-rw-r--r--src/H5FDstdio.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/src/H5FDstdio.c b/src/H5FDstdio.c
index d182185..f85ab34 100644
--- a/src/H5FDstdio.c
+++ b/src/H5FDstdio.c
@@ -797,8 +797,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)
@@ -904,8 +902,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) ||