# HG changeset patch # User Markus Mützel # Date 1613925328 -3600 # Sun Feb 21 17:35:28 2021 +0100 # Branch stable # Node ID cee1cf711a4e9a86698029bee519b1615c93e648 # Parent 26039aa0d2c424e853a1e0ec027389a54074837a ls-hdf5.cc: Handle non-zero terminated type strings (bug #60081). * ls-hdf5.cc (hdf5_read_next_data_internal): Use only valid chars of type char array. diff -r 26039aa0d2c4 -r cee1cf711a4e libinterp/corefcn/ls-hdf5.cc --- a/libinterp/corefcn/ls-hdf5.cc Sun Feb 21 16:45:11 2021 +0100 +++ b/libinterp/corefcn/ls-hdf5.cc Sun Feb 21 17:35:28 2021 +0100 @@ -743,13 +743,13 @@ H5Tclose (st_id); H5Dclose (data_id); - if (std::string (typ) == "inline function") + if (std::string (typ, slen-1) == "inline function") { retval = load_inline_fcn (subgroup_id, name, d->tc); } else { - d->tc = type_info.lookup_type (typ); + d->tc = type_info.lookup_type (std::string (typ, slen-1)); try {