[svn-r24002] Fix 32-bit and valgrind issues with new handle_paths code - correct math of adding a NULL to a string.

Tested: local linux (valgrind) and h5committest
This commit is contained in:
Allen Byrne
2013-08-13 12:48:57 -05:00
parent 4935d0bfab
commit e8d0919d43

View File

@@ -1415,7 +1415,7 @@ lnk_search(const char *path, const H5L_info_t *li, void *_op_data)
}
else
HDstrncpy(search_name, op_name, (size_t)search_len + 1);
search_name[search_len + k] = '\0';
search_name[search_len + k - 1] = '\0';
if(HDstrcmp(path, search_name) == 0) {
switch(li->type) {