From 748eaea76428c07de4149c1242244baea9da6e59 Mon Sep 17 00:00:00 2001 From: Shaun Reed Date: Tue, 20 Aug 2024 12:27:45 -0400 Subject: [PATCH] Check hasConfig during deserialization. --- tiledb/sm/serialization/array_schema.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tiledb/sm/serialization/array_schema.cc b/tiledb/sm/serialization/array_schema.cc index 8c222f0bf502..aa3d299ad4b5 100644 --- a/tiledb/sm/serialization/array_schema.cc +++ b/tiledb/sm/serialization/array_schema.cc @@ -1909,7 +1909,9 @@ void serialize_load_array_schema_request( LoadArraySchemaRequest load_array_schema_request_from_capnp( capnp::LoadArraySchemaRequest::Reader& reader) { tdb_unique_ptr 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)); + } // 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);