]> git.ipfire.org Git - thirdparty/util-linux.git/commit
setterm: avoid restoring flags from uninitialized memory
authorChris Hofstaedtler <zeha@debian.org>
Tue, 31 Oct 2023 13:52:26 +0000 (14:52 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 1 Nov 2023 12:03:03 +0000 (13:03 +0100)
commit87f0a503c92242feeea2afcfcdcce3c446f5f52c
tree563e8b663affeca92cd807bad9a89e02b238534a
parentd8379563fe5c8a4adba12804abbe20e43a8e1cde
setterm: avoid restoring flags from uninitialized memory

Depending on the used compiler and flags, previously either F_SETFL was called
with 0 or with a random value. Never with the intended previous flags.

[kzak@redhat.com: - tiny coding style change]

Signed-off-by: Chris Hofstaedtler <zeha@debian.org>
Tested-by: Emanuele Rocca <ema@debian.org>
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/setterm.c