mirror of
https://github.com/HDFGroup/hdf5.git
synced 2024-11-27 02:10:55 +08:00
[svn-r20217] Valgrind indicated error in reading past end of buffer.
Tested: local linux and valgrind
This commit is contained in:
parent
5b3223c7c5
commit
a76a2e1620
@ -1463,8 +1463,11 @@ dump_selected_attr(hid_t loc_id, const char *name)
|
||||
obj_name = (char *)HDmalloc((size_t)j + 2);
|
||||
|
||||
/* find the last / */
|
||||
while(name[j] != '/' && j >= 0)
|
||||
while(j >= 0) {
|
||||
if (name[j] == '/')
|
||||
break;
|
||||
j--;
|
||||
}
|
||||
|
||||
/* object name */
|
||||
if(j == -1)
|
||||
|
Loading…
Reference in New Issue
Block a user