summaryrefslogtreecommitdiffstats
path: root/src/H5FDcore.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2003-01-24 18:09:57 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2003-01-24 18:09:57 (GMT)
commita6542d06b12340af99731eacb1d9687cdc8738ed (patch)
tree4852a2c3f1ac831c522a776bc3bfa95faa922a27 /src/H5FDcore.c
parente4dc71bbee2d38d01adb4a39bdf52a4c79e2d746 (diff)
downloadhdf5-a6542d06b12340af99731eacb1d9687cdc8738ed.zip
hdf5-a6542d06b12340af99731eacb1d9687cdc8738ed.tar.gz
hdf5-a6542d06b12340af99731eacb1d9687cdc8738ed.tar.bz2
[svn-r6330] Purpose:
Bug Fix Description: When calling H5Fopen with the core VFL driver, but without the H5F_ACC_CREAT flag goes ahead and creates a memory file. Solution: Check for the H5F_ACC_CREAT flag before allowing the memory file to be created. Platforms tested: FreeBSD 4.7 (sleipnir)
Diffstat (limited to 'src/H5FDcore.c')
-rw-r--r--src/H5FDcore.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/H5FDcore.c b/src/H5FDcore.c
index 14ab106..fc56096 100644
--- a/src/H5FDcore.c
+++ b/src/H5FDcore.c
@@ -330,6 +330,8 @@ H5FD_core_open(const char *name, unsigned UNUSED flags, hid_t fapl_id,
FUNC_ENTER_NOAPI(H5FD_core_open, NULL);
/* Check arguments */
+ if (!(H5F_ACC_CREAT & flags))
+ HGOTO_ERROR(H5E_ARGS, H5E_UNSUPPORTED, NULL, "must create core files, not open them");
if (0==maxaddr || HADDR_UNDEF==maxaddr)
HGOTO_ERROR(H5E_ARGS, H5E_BADRANGE, NULL, "bogus maxaddr");
if (ADDR_OVERFLOW(maxaddr))