aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2025-11-23 19:38:23 +0100
committerPřemysl Eric Janouch <p@janouch.name>2025-11-23 19:38:51 +0100
commitb766c9ef2064b5a63f59aac0aa27ae46b66ae66b (patch)
tree188b7524bf4e227e0aa5f9ee82a1dc0182809280
parent6868bde5e6f636e43846aead6cc4793ed0c476dc (diff)
downloadacid-master.tar.gz
acid-master.tar.xz
acid-master.zip
Improve current Arch Linux run logHEADorigin/mastermaster
-rw-r--r--LICENSE2
-rw-r--r--terminal.go8
2 files changed, 6 insertions, 4 deletions
diff --git a/LICENSE b/LICENSE
index d48c2ad..2f82d2f 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,4 @@
-Copyright (c) 2024, Přemysl Eric Janouch <p@janouch.name>
+Copyright (c) 2024 - 2025, Přemysl Eric Janouch <p@janouch.name>
Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.
diff --git a/terminal.go b/terminal.go
index 55eabb5..9886ef0 100644
--- a/terminal.go
+++ b/terminal.go
@@ -210,11 +210,13 @@ func (tw *terminalWriter) processParsedCSI(
if len(params) == 0 {
tw.line = tw.lineTop
tw.column = 0
- } else if len(params) >= 2 && params[0] != 0 && params[1] != 0 {
+ } else if len(params) < 2 || params[0] <= 0 || params[1] <= 0 {
+ return false
+ } else if params[0] >= 32766 && params[1] >= 32766 {
+ // Ignore attempts to scan terminal bounds.
+ } else {
tw.line = tw.lineTop + params[0] - 1
tw.column = params[1] - 1
- } else {
- return false
}
return true
case final == 'J': // Erase in Display