You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Python][C++] ipc::ReadSchema(const Message&) decodes non-Schema message header as org::apache::arrow::flatbuf::Schema #55368
Describe the bug, including details regarding any error messages, version, and platform.
The ipc::ReadSchema(io::InputStream*, ...) overload and UnpackSchemaMessage both check that the incoming message has MessageType::SCHEMA before decoding it. However, the ipc::ReadSchema(const Message&, ...) overload in cpp/src/arrow/ipc/reader.cc does not check message.type(): it passes message.header() directly to internal::GetSchema, which casts the FlatBuffer root table to org::apache::arrow::flatbuf::Schema.
When a RecordBatch or DictionaryBatchMessage is passed to ipc::ReadSchema(const Message&, ...) (including via pyarrow.ipc.read_schema(message)), its header table was verified only for that message type, and reading it through the Schema FlatBuffer accessors interprets its fields with the wrong table layout instead of returning an Invalid / IOError status.
Expected behavior
ipc::ReadSchema(const Message&, ...) should validate CHECK_MESSAGE_TYPE(MessageType::SCHEMA, message.type()); before calling internal::GetSchema, matching the stream overload and returning the same IOError when given a non-Schema message.
changed the title [-][C++] ipc::ReadSchema(const Message&) decodes non-Schema message header as org::apache::arrow::flatbuf::Schema[/-][+][Python][C++] ipc::ReadSchema(const Message&) decodes non-Schema message header as org::apache::arrow::flatbuf::Schema[/+]on Nov 2, 2026
Activity
[-][C++] ipc::ReadSchema(const Message&) decodes non-Schema message header as org::apache::arrow::flatbuf::Schema[/-][+][Python][C++] ipc::ReadSchema(const Message&) decodes non-Schema message header as org::apache::arrow::flatbuf::Schema[/+]apacheGH-55368: [C++][IPC] Check message type in ReadSchema