Commit f5dc8e2
authored
HDF5: Fix Segfault with libSplash Files (#962)
* HDF5: Fix Segfault with libSplash Files
Fix a segfault (on some systems) with legacy libSplash HDF5 files.
From the docs:
```
Name: H5Tget_member_name
...
The HDF5 Library allocates a buffer to receive the name of the
field. The caller must subsequently free the buffer with
H5free_memory.
```
Refs.:
- https://support.hdfgroup.org/HDF5/doc/RM/RM_H5T.html#Datatype-GetMemberName
- https://support.hdfgroup.org/HDF5/doc/RM/RM_H5.html#Library-FreeMemory
* avoid undefined behavior in str(n)cmp
Passing potential `nullptr`s is undefined behavior.
* Clang-Tidy: Intentional Branch Clone1 parent 6fd3936 commit f5dc8e2
1 file changed
+13
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1424 | 1424 | | |
1425 | 1425 | | |
1426 | 1426 | | |
1427 | | - | |
1428 | | - | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
1429 | 1430 | | |
1430 | 1431 | | |
1431 | 1432 | | |
| |||
1446 | 1447 | | |
1447 | 1448 | | |
1448 | 1449 | | |
1449 | | - | |
1450 | | - | |
| 1450 | + | |
| 1451 | + | |
| 1452 | + | |
1451 | 1453 | | |
1452 | 1454 | | |
1453 | 1455 | | |
| |||
1463 | 1465 | | |
1464 | 1466 | | |
1465 | 1467 | | |
1466 | | - | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
1467 | 1471 | | |
1468 | | - | |
1469 | | - | |
1470 | | - | |
| 1472 | + | |
| 1473 | + | |
| 1474 | + | |
1471 | 1475 | | |
1472 | 1476 | | |
1473 | 1477 | | |
| |||
1498 | 1502 | | |
1499 | 1503 | | |
1500 | 1504 | | |
1501 | | - | |
| 1505 | + | |
1502 | 1506 | | |
1503 | 1507 | | |
1504 | 1508 | | |
| |||
0 commit comments