[PR #17536] AtlasEngine: Fix a buffer overrun #31261

Open
opened 2026-01-31 09:46:08 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/17536

State: closed
Merged: Yes


The strided memcpy between buffers failed to account for situations
where the destination stride is smaller than the source stride.
The solution is to only copy as many bytes as are in each row.

Validation Steps Performed

Even with AppVerifier the issue could not be reproduced.
Adding an assert(srcStride <= mapped.RowPitch), however, did trap
the bug when WARP is used while BackendD3D is force-enabled.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/17536 **State:** closed **Merged:** Yes --- The strided `memcpy` between buffers failed to account for situations where the destination stride is smaller than the source stride. The solution is to only copy as many bytes as are in each row. ## Validation Steps Performed Even with AppVerifier the issue could not be reproduced. Adding an `assert(srcStride <= mapped.RowPitch)`, however, did trap the bug when WARP is used while BackendD3D is force-enabled.
claunia added the pull-request label 2026-01-31 09:46:08 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#31261