diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-10-19 03:31:14 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-10-19 03:31:14 (GMT) |
commit | 2e242bfd2214ec9a804428763d0e158499dd04f5 (patch) | |
tree | 78f6200a4cf677cb8544782e37594b9b188c3b49 /src/H5Oattr.c | |
parent | 45727db7998415ace57a84b20ef75d4298af16ab (diff) | |
download | hdf5-2e242bfd2214ec9a804428763d0e158499dd04f5.zip hdf5-2e242bfd2214ec9a804428763d0e158499dd04f5.tar.gz hdf5-2e242bfd2214ec9a804428763d0e158499dd04f5.tar.bz2 |
[svn-r9434] 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/H5Oattr.c')
-rw-r--r-- | src/H5Oattr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/H5Oattr.c b/src/H5Oattr.c index f454b74..3bb9bd8 100644 --- a/src/H5Oattr.c +++ b/src/H5Oattr.c @@ -344,7 +344,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); |