mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r3131] Purpose:
Bug fix Description: Non-optimized conversions have a memory overwrite bug when the destination size of a compound datatype is greater than the source size. Solution: Corrected direction of walking through the destination array for final copying. Platforms tested: FreeBSD 4.2 (hawkwind) & Cray J90 (killeen)
This commit is contained in:
parent
c701e8b89f
commit
1f4c821432
@ -1149,6 +1149,10 @@ H5T_conv_struct(hid_t src_id, hid_t dst_id, H5T_cdata_t *cdata, size_t nelmts,
|
||||
xbkg += bkg_stride;
|
||||
}
|
||||
|
||||
/* If the bkg_stride was set to -(dst->size), make it positive now */
|
||||
if(buf_stride==0 && dst->size>src->size)
|
||||
bkg_stride=dst->size;
|
||||
|
||||
/*
|
||||
* Copy the background buffer back into the in-place conversion
|
||||
* buffer.
|
||||
|
Loading…
Reference in New Issue
Block a user