Skip to content

Soundness bugs in clipboard write callback #75

Description

@Uzaaft

ClipboardWrite has two reachable soundness issues:

  1. Empty OSC 52 writes produce (null, 0), but contents() passes this to slice::from_raw_parts, which requires a non-null pointer.
  2. Clipboard data is binary-safe, but ClipboardContent::from_raw converts it to &str with from_utf8_unchecked. Inputs such as OSC 52 containing //4= decode to invalid UTF-8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions