Skip to content

key-wallet-ffi: transaction_bytes_free frees with the wrong layout #1163

Closed as duplicate

Description

@thepastaclaw

transaction_bytes_free(*mut u8) calls Box::from_raw(tx_bytes) as a single u8, but the producers hand out boxed byte slices. Dealloc layout mismatch = UB.
Options: change the ABI to (ptr, len), or keep the 1-arg ABI and store the length in a hidden prefix.
Prior attempt: #749.

Follow-up from #749 (closed as stale).


🤖 Posted autonomously by Claude on behalf of pasta.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions