#1143527 terminfo: go-infocmp fails on terminfo entries larger than 4096 bytes

Package:
terminfo
Source:
terminfo
Description:
Binary package for terminfo
Submitter:
Sven Joachim
Date:
2026-08-17 17:43:06 UTC
Severity:
normal
Tags:
#1143527#5
Date:
2026-08-03 16:28:15 UTC
From:
To:
The go-infocmp program does not handle terminfo entries larger than 4096
bytes.  This is a problem since many xterm* entries are now larger than
that limit.

,----
| $ go-infocmp -term xterm
| 2026/08/03 18:19:18 invalid file size
| $ go-infocmp -term xterm-256color
| 2026/08/03 18:19:26 invalid file size
| $ stat -c '%s %n' /usr/share/terminfo/x/xterm{,-256color}
| 4156 /usr/share/terminfo/x/xterm
| 4242 /usr/share/terminfo/x/xterm-256color
`----

The remedy is likely to increase maxFileLength to 32768 in dec.go, but I
have not tested that.  Note that the limit has been raised to 32768
bytes since ncurses 6.1 (released 2018), but only this year have popular
terminfo entries started to exceed the previous limit of 4096 bytes.

#1143527#10
Date:
2026-08-10 16:17:18 UTC
From:
To:
Control: forwarded -1 https://github.com/xo/terminfo/pull/3
Control: tags -1 + patch

The attached patch works for me, and I have sent a pull request
upstream.  There has been no activity there for nearly four years,
though.

Cheers,
       Sven