Package: screen
Version: 5.0.1-2
Severity: normal
X-Debbugs-Cc: [email protected]

Hello,

The %= string escape can be used to align or force the position of some
string. For instance
caption always "X%010=Y"
would show a caption string "X         Y" on the bottom of the terminal.
What it actually shows for me is "X         8Y".
The 'Y' is one character too far and the '8' is likely a stray
character in the buffer. (My regular caption string has an 8 in that
position.)
But sometimes, the Y is entierly missing. Especially when the %=
wouldn't truncate the existing string, but rather pad it.

I guess sometimes the 'Y' doesn't show up at all because there's a stray
NUL byte at the position the Y is supposed to go.

This bug really looks like an off-by-one error when indexing the buffer
that builds the caption string.

Best regards,
Celelibi


-- Package-specific info:
File Existence and Permissions
------------------------------

drwxr-xr-x 32 root root   1000 May 28 03:33 /run
lrwxrwxrwx  1 root root      4 Jan 15  2017 /var/run -> /run
-rwxr-xr-x  1 root root 482016 May 16 02:00 /usr/bin/screen
-rw-r--r--  1 root root     29 Jul  3  2017 /etc/tmpfiles.d/screen-cleanup.conf
lrwxrwxrwx  1 root root      9 Jan 15  2017 
/lib/systemd/system/screen-cleanup.service -> /dev/null
-rwxr-xr-x  1 root root   1222 Apr  3  2017 /etc/init.d/screen-cleanup
lrwxrwxrwx  1 root root     24 Jan 15  2017 /etc/rcS.d/S01screen-cleanup -> 
../init.d/screen-cleanup

File contents
-------------

### /etc/tmpfiles.d/screen-cleanup.conf
______________________________________________________________________
d /run/screen 1777 root utmp
______________________________________________________________________

-- System Information:
Debian Release: forky/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.19.13+deb14-amd64 (SMP w/8 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_FIRMWARE_WORKAROUND, 
TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages screen depends on:
ii  debianutils  5.23.2
ii  libc6        2.42-16
ii  libpam0g     1.7.0-5+b2
ii  libtinfo6    6.6+20251231-1+b1

screen recommends no packages.

Versions of packages screen suggests:
pn  byobu | screenie | iselect  <none>
ii  ncurses-term                6.6+20251231-1

-- no debconf information

Reply via email to