]> git.ipfire.org Git - thirdparty/coreutils.git/commit
pr: fix infinite loop when double spacing
authorPádraig Brady <P@draigBrady.com>
Tue, 25 Apr 2023 13:07:03 +0000 (14:07 +0100)
committerPádraig Brady <P@draigBrady.com>
Tue, 25 Apr 2023 13:18:35 +0000 (14:18 +0100)
commit3fb0cc80fa5e1cede9ec05303a70c26d0d23ca1d
tree91f9f5268e56766ac7ed06489812746a96366c13
parentcc078f747f3db00e70b2ae2ad2ab34e8d54316d3
pr: fix infinite loop when double spacing

* src/pr.c (init_parameters): Ensure we avoid a 0 lines_per_body
which was possible when adjusting for double spacing.
That caused print_page() to always return true,
causing an infinite loop.
* tests/pr/pr-tests.pl: Add a test case.
* NEWS: Mention the fix.
Fixes https://bugs.debian.org/1034808
NEWS
src/pr.c
tests/pr/pr-tests.pl