Commits

clee83 committed 4786f4094fa
Fix a bug occurring when an unlimited dimension with zero elements is converted without EOS2 option. An internal function convert_sdszerounlimit() calls H4toH5all_dimscale(), but one of parameter may not be what the callee accepts. The fourth argument of H4toH5all_dimscale() should not be the fully-qualified dataset path, but convert_sdszerounlimit() has passed that. This changelist adds additional parameter to convert_sdszerounlimit() so that the pure SDS name (or NULL) can be passed from H4toH5_sds(), and convert_sdszerounlimit() pass the received argument to H4toH5all_dimscale(). While doing this, I found two potential problems. In H4toH5all_dimscale() has not returned immediately even though the function failed and all resources were reclaimed. This has resulted in free(3) with wrong address. I added return FAIL; statement. Another potential problem is that strncpy() has not been used correctly. Since enough space is guaranteed, I just replaced it by strcpy().