Mercurial > octave
changeset 29385:cee1cf711a4e stable
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.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sun, 21 Feb 2021 17:35:28 +0100 |
parents | 26039aa0d2c4 |
children | 802ac1a16fee 21a73c2a1fcb |
files | libinterp/corefcn/ls-hdf5.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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 {