I haven't had the time to test this hypothesis but looking at the HDF5
C++ wrapping code it looks like it may not be terminating the string
before converting to C++ std::string if the H5Dread doesn't do that by
itself for some reason. Maybe worth trying this patch?


*** hdf5-1.8.7/c++/src/H5DataSet-fix.cpp        2011-09-28 11:44:09.000000000 
+0100
--- hdf5-1.8.7/c++/src/H5DataSet.cpp            2011-04-20 22:23:08.000000000 
+0100
***************
*** 721,729 ****
            throw DataSetIException("DataSet::read", "H5Dread failed for fixed 
length string");
        }
  
-         // Terminate the string
-         strg_C[attr_size]=0;
- 
        // Get string from the C char* and release resource allocated locally
        strg = strg_C;
        delete []strg_C;
--- 721,726 ----


-- 
Bojan Nikolic          ||          http://www.bnikolic.co.uk


_______________________________________________
Hdf-forum is for HDF software users discussion.
[email protected]
http://mail.hdfgroup.org/mailman/listinfo/hdf-forum_hdfgroup.org

Reply via email to