Commit 855942b
authored
fix integer underflow bug in ReadConsoleForTermEmulModern() (#804)
From directvt/vtm#819 (comment)
> When a window resize event is received (terminal generates WINDOW_BUFFER_SIZE_EVENT event when switching between alternate/normal buffer mode), the variable text_len=0 may accidentally decrease by one and become text_len=-1
potentially fixes PowerShell/Win32-OpenSSH#22751 parent e98b11e commit 855942b
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
186 | | - | |
187 | | - | |
188 | | - | |
189 | | - | |
190 | | - | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
191 | 193 | | |
192 | 194 | | |
193 | 195 | | |
| |||
0 commit comments