Repository navigation
Commit 2530d19
authored
fix(core): clip glyphs left of the buffer (#1361)
one sentence: check should not be inclusive.
drawTextBufferInternal did not clip a width-1 glyph at currentX == -1.
The transparent text path then calculated an invalid u32 index and read
past the cell buffer.
Clip each glyph when its range ends at or before column 0.
Assert that the index is in the cell buffer before direct access.
This fixes the abort in OpenCode issue
[#42094](anomalyco/opencode#42094).
The stack includes trySetTransparentTextCellFast and
bufferDrawTextBufferView.1 parent 14b3d13 commit 2530d19
3 files changed
Lines changed: 44 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1018 | 1018 | | |
1019 | 1019 | | |
1020 | 1020 | | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
1021 | 1024 | | |
1022 | 1025 | | |
1023 | 1026 | | |
| |||
1768 | 1771 | | |
1769 | 1772 | | |
1770 | 1773 | | |
1771 | | - | |
| 1774 | + | |
| 1775 | + | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
1772 | 1780 | | |
1773 | 1781 | | |
1774 | 1782 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
541 | 541 | | |
542 | 542 | | |
543 | 543 | | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
544 | 563 | | |
545 | 564 | | |
546 | 565 | | |
| |||
0 commit comments