The example contains:
// This reads the top-level core/asdf-1.0.0 schema
err = asdf_get_meta(file, "/", &meta);
if (err == ASDF_VALUE_OK) {
if (meta->history.entries[0]) {
// This is a NULL-terminated array of asdf_history_entry_t*
printf("first history entry: %s\n", meta->history.entries[0]->description);
}
}
when run with a file without a history entry the entries are indexed out of bounds and the program crashes (segfaults).
This example should be updated to check if an entry exists and produce an informative error if there is none.
The example contains:
when run with a file without a history entry the entries are indexed out of bounds and the program crashes (segfaults).
This example should be updated to check if an entry exists and produce an informative error if there is none.