diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2004-08-08 22:12:21 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2004-08-08 22:12:21 (GMT) |
commit | f9e414bc751c50eee75bc7ec77690843c68c6f9a (patch) | |
tree | 7bc2e5f04da1cc1121b3bb580140e875de2fec9e /src/H5Tconv.c | |
parent | 5a7fcfa213dbd65e8745d842b229ad777deace94 (diff) | |
download | hdf5-f9e414bc751c50eee75bc7ec77690843c68c6f9a.zip hdf5-f9e414bc751c50eee75bc7ec77690843c68c6f9a.tar.gz hdf5-f9e414bc751c50eee75bc7ec77690843c68c6f9a.tar.bz2 |
[svn-r9054] Purpose:
Bug fix
Description:
Correct possible core dump when a datatype conversion function is
registered with the library after a compound datatype has been converted
(having it's type conversion information cached by the library). The compound
datatype must have been created by inserting the fields in non-increasing
offset order to see the bug.
Solution:
Re-sort the fields in the compound datatypes before recalculating the
cached information when performing the conversion on them.
Platforms tested:
FreeBSD 4.10 (sleipnir)
h5committested
Diffstat (limited to 'src/H5Tconv.c')
-rw-r--r-- | src/H5Tconv.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/H5Tconv.c b/src/H5Tconv.c index fd7693a..2bce779 100644 --- a/src/H5Tconv.c +++ b/src/H5Tconv.c @@ -1363,6 +1363,12 @@ H5T_conv_struct_init (H5T_t *src, H5T_t *dst, H5T_cdata_t *cdata, hid_t dxpl_id) } } } + else { + /* Restore sorted conditions for the datatypes */ + /* (Required for the src2dst array to be valid) */ + H5T_sort_value(src, NULL); + H5T_sort_value(dst, NULL); + } /* end else */ /* * (Re)build the cache of member conversion functions and pointers to |