Skip to content

Commit

Permalink
Check hasConfig during deserialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
shaunrd0 committed Aug 27, 2024
1 parent 78cfb45 commit 5214777
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tiledb/sm/serialization/array_schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1909,7 +1909,11 @@ void serialize_load_array_schema_request(
LoadArraySchemaRequest load_array_schema_request_from_capnp(
capnp::LoadArraySchemaRequest::Reader& reader) {
tdb_unique_ptr<Config> decoded_config = nullptr;
throw_if_not_ok(config_from_capnp(reader.getConfig(), &decoded_config));
if (reader.hasConfig()) {
throw_if_not_ok(config_from_capnp(reader.getConfig(), &decoded_config));
} else {
decoded_config.reset(tdb_new(Config));
}
// We intentionally do not use the includeEnumerations field, as it is stored
// in the Config and set using the LoadArraySchemaRequest constructor.
return LoadArraySchemaRequest(*decoded_config);
Expand Down

0 comments on commit 5214777

Please # to comment.