Subject: coreutils: pr: -n width explodes sometimes?

From: наб <[email-masked]>
Date: Fri, 5 May 2023 22:52:02 +0200

Package: coreutils
Version: 8.32-4+b1
Version: 9.1-1
Severity: normal

Dear Maintainer,

-- >8 --
$ pr -w22 -2 -n american.med+.mwl | head

2023-05-05 18:58 american.med+.mwl Page 1

    1   a/    57   Ab
    2   A'    58   ab
    3   AA    59   ab
    4   Aa    60   ab
    5   Aa    61   ab
$ pr -w22 -3 -n american.med+.mwl | head

2023-05-05 18:58 american.med+.mwl Page 1

    1   a 57   A113   a
    2   A 58   a114   a
    3   A 59   a115   a
    4   A 60   a116   a
    5   A 61   a117   a
$ pr -w22 -4 -n american.med+.mwl | head

2023-05-05 18:58 american.med+.mwl Page 1

    1   a57  A113 a169 a
    2   A58  a114 a170 a
    3   A59  a115 a171 a
    4   A60  a116 a172 a
    5   A61  a117 a173 a
$ pr -w22 -5 -n american.med+.mwl | head

2023-05-05 18:58 american.med+.mwl Page 1

    1   a57 A113a169a225a
    2   A58 a114a170a226a
    3   A59 a115a171a227a
    4   A60 a116a172a228a
    5   A61 a117a173a229a
-- >8 --
(same with explicit -n5).

I don't think I need to tell you this is wrong,
and in a truly amazing fashion at that.

наб

-- System Information:
Debian Release: 12.0
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: x32 (x86_64)
Foreign Architectures: amd64, i386

Kernel: Linux 6.1.0-2-amd64 (SMP w/2 CPU threads; PREEMPT)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.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 coreutils depends on:
ii  libacl1      2.3.1-3
ii  libattr1     1:2.5.1-4
ii  libc6        2.36-9
ii  libgmp10     2:6.2.1+dfsg1-1.1
ii  libselinux1  3.4-1+b5

coreutils recommends no packages.

coreutils suggests no packages.

-- no debconf information