Skip to content

Commit

Permalink
Explicitly fail on unsupported datatype read (HDFGroup#76)
Browse files Browse the repository at this point in the history
Previously, the read buffer would silently be left uninitialized
as though the read had succeeded.
  • Loading branch information
mattjala authored Sep 29, 2023
1 parent 12db02d commit c2ab7ab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rest_vol_dataset.c
Original file line number Diff line number Diff line change
Expand Up @@ -4176,6 +4176,9 @@ rv_dataset_read_cb(hid_t mem_type_id, hid_t mem_space_id, hid_t file_space_id, v

memcpy(buf, obj_ref_buf, read_data_size);
}
else {
FUNC_GOTO_ERROR(H5E_DATATYPE, H5E_UNSUPPORTED, FAIL, "unsupported datatype");
}
}

done:
Expand Down

0 comments on commit c2ab7ab

Please sign in to comment.