Fix various bugs in HDF5 interface / MGXS code (found by valgrind)

This commit is contained in:
Paul Romano 2018-09-24 13:29:11 -05:00
parent 2afb1249b2
commit e2ed9c7553
3 changed files with 10 additions and 6 deletions

View file

@ -208,7 +208,7 @@ void
get_name_c(int index, int name_len, char* name)
{
// First blank out our input string
std::string str(name_len, ' ');
std::string str(name_len - 1, ' ');
std::strcpy(name, str.c_str());
// Now get the data and copy to the C-string