diff options
author | Mark Kittisopikul <mkitti@users.noreply.github.com> | 2023-07-16 04:31:57 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-16 04:31:57 (GMT) |
commit | 426a7f82f6ce4d75ec8bfd30d1fa198c49efaa97 (patch) | |
tree | b6c081097820ecf75c62fca196ab6e85f8e81cb8 /c++/src | |
parent | 305ac8886566968ae58ba771e0ae2ba6434ac9f0 (diff) | |
download | hdf5-426a7f82f6ce4d75ec8bfd30d1fa198c49efaa97.zip hdf5-426a7f82f6ce4d75ec8bfd30d1fa198c49efaa97.tar.gz hdf5-426a7f82f6ce4d75ec8bfd30d1fa198c49efaa97.tar.bz2 |
Avoid truncating at null byte when copying to std::string (#3083)
---------
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'c++/src')
-rw-r--r-- | c++/src/H5DataSet.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/c++/src/H5DataSet.cpp b/c++/src/H5DataSet.cpp index 7d19a6d..40b40f2 100644 --- a/c++/src/H5DataSet.cpp +++ b/c++/src/H5DataSet.cpp @@ -729,7 +729,7 @@ DataSet::p_read_fixed_len(const hid_t mem_type_id, const hid_t mem_space_id, con } // Get string from the C char* and release resource allocated locally - strg = strg_C; + strg = H5std_string(strg_C, data_size); delete[] strg_C; } } |