From 79d30fde6458b775d943587cae0578b78e74577d Mon Sep 17 00:00:00 2001 From: enricobuehler Date: Wed, 22 Jul 2026 14:04:42 +0200 Subject: [PATCH] fix(windows/capture): unsafe block for the extracted dup_into_public call Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/pf-capture/src/windows/idd_push.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/crates/pf-capture/src/windows/idd_push.rs b/crates/pf-capture/src/windows/idd_push.rs index 78dc005a..2b83b77d 100644 --- a/crates/pf-capture/src/windows/idd_push.rs +++ b/crates/pf-capture/src/windows/idd_push.rs @@ -2076,7 +2076,9 @@ fn deliver_cursor_channel( cs: &cursor::CursorShared, send_cursor: &crate::CursorChannelSender, ) -> bool { - let value = match broker.dup_into_public(cs.section_handle()) { + // SAFETY: `cs.section_handle()` borrows the section mapping `cs` owns (live across this + // synchronous call); the broker's WUDFHost process handle is live for the broker's lifetime. + let value = match unsafe { broker.dup_into_public(cs.section_handle()) } { Ok(v) => v, Err(e) => { tracing::warn!("cursor section duplication failed (composited cursor stays): {e:#}");