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
fix: pad SecureBuffer data to 16-byte boundary on Windows
Windows CryptProtectMemory API requires memory regions to be aligned to
16-byte boundaries. This commit modifies SecureBuffer to automatically
pad data to meet this requirement while preserving the logical length.
Changes:
- Add `logical_len` field to track actual data length excluding padding
- Pad data to 16-byte boundary on Windows before calling protect_memory
- Update as_slice() to return only logical data (without padding)
- Update into_inner() to truncate padding before returning
- Update Clone implementation to work with logical data
Fixes test failures on Windows:
- mcp::secure_memory::tests::test_secure_buffer_creation (3 bytes)
- mcp::secure_memory::tests::test_secure_buffer_as_slice (3 bytes)
- mcp::secure_memory::tests::test_secure_buffer_clone (3 bytes)
- mcp::secure_memory::tests::test_secure_buffer_into_inner (3 bytes)
- mcp::executors::git::tests::test_set_credentials_clears_ssh (8 bytes)
- mcp::executors::ssh_executor::tests::test_ssh_executor_creation (8 bytes)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments