summaryrefslogtreecommitdiffstats
path: root/src/H5Fsuper.c
diff options
context:
space:
mode:
authorNeil Fortner <nfortne2@hdfgroup.org>2009-03-26 15:12:48 (GMT)
committerNeil Fortner <nfortne2@hdfgroup.org>2009-03-26 15:12:48 (GMT)
commit4e82abd8b3b4d96fe7bc02262c9efd316905a53e (patch)
tree3917392cfb02eef1f5096170e92caf6bd03b16b3 /src/H5Fsuper.c
parentbd1fe8cd74d80f03f84ade1b0d0255222830e916 (diff)
downloadhdf5-4e82abd8b3b4d96fe7bc02262c9efd316905a53e.zip
hdf5-4e82abd8b3b4d96fe7bc02262c9efd316905a53e.tar.gz
hdf5-4e82abd8b3b4d96fe7bc02262c9efd316905a53e.tar.bz2
[svn-r16615] Purpose: Fix bug 1499
Description: Due to a bug in H5F_super_read, every time a file with a user block was opened it would grow by the size of the user block. The bug has been fixed, and comments have been added to clarify when an eoa address should be relative and when it should be absolute. Tested: jam, linew (h5committest)
Diffstat (limited to 'src/H5Fsuper.c')
-rw-r--r--src/H5Fsuper.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/H5Fsuper.c b/src/H5Fsuper.c
index 04abfb2..8040554 100644
--- a/src/H5Fsuper.c
+++ b/src/H5Fsuper.c
@@ -560,7 +560,8 @@ H5F_super_read(H5F_t *f, hid_t dxpl_id, H5G_loc_t *root_loc)
* Tell the file driver how much address space has already been
* allocated so that it knows how to allocate additional memory.
*/
- if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eoa) < 0)
+ /* (Account for the stored EOA being absolute offset -NAF) */
+ if(H5FD_set_eoa(lf, H5FD_MEM_SUPER, stored_eoa - H5F_BASE_ADDR(f)) < 0)
HGOTO_ERROR(H5E_FILE, H5E_CANTOPENFILE, FAIL, "unable to set end-of-address marker for file")
/* Read the file's superblock extension, if there is one. */