summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-10-19 03:31:11 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-10-19 03:31:11 (GMT)
commita4c0ed037424ada07720a22ebb15a58f199c5b78 (patch)
treec67f19286f10b58c299a0fbd0eab0756eb5c7853 /src
parent4f846baa4a2ab80ac70a8b288589e307926534bf (diff)
downloadhdf5-a4c0ed037424ada07720a22ebb15a58f199c5b78.zip
hdf5-a4c0ed037424ada07720a22ebb15a58f199c5b78.tar.gz
hdf5-a4c0ed037424ada07720a22ebb15a58f199c5b78.tar.bz2
[svn-r9433] Purpose:
Bug fix Description: Fix core dump when flushing a file with a newly created attribute which hasn't had a value written to it still open. Solution: Write the attribute fill value when appropriate. Platforms tested: FreeBSd 4.10 (sleipnir) Linux 2.4 (verbena) Solaris 2.7 (arabica)
Diffstat (limited to 'src')
-rw-r--r--src/H5Oattr.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c
index f816b2c..1493403 100644
--- a/src/H5Oattr.c
+++ b/src/H5Oattr.c
@@ -340,7 +340,10 @@ H5O_attr_encode(H5F_t *f, uint8_t *p, const void *mesg)
p += attr->ds_size;
/* Store attribute data */
- HDmemcpy(p,attr->data,attr->data_size);
+ if(attr->data)
+ HDmemcpy(p,attr->data,attr->data_size);
+ else
+ HDmemset(p,0,attr->data_size);
done:
FUNC_LEAVE_NOAPI(ret_value);