]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libsmartcols: fix reduction stages use
authorKarel Zak <kzak@redhat.com>
Wed, 15 May 2024 13:45:19 +0000 (15:45 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 15 May 2024 13:47:05 +0000 (15:47 +0200)
commit8a01276a3c5bc09dce342e087019c704d8c56a32
tree7cd1d6d891017c0938879df94cc140adc172ba2e
parentc731e9666597a923aabeeb040d563ccee36efd7e
libsmartcols: fix reduction stages use

There is no proper check for the number of reduction stages, so in
some cases, the code can loop indefinitely.

The patch also fixes 'rc' variable shadowing.

Fixes: https://github.com/util-linux/util-linux/issues/3046
Signed-off-by: Karel Zak <kzak@redhat.com>
libsmartcols/src/calculate.c