setterm: avoid restoring flags from uninitialized memory
authorChris Hofstaedtler <zeha@debian.org>
Tue, 31 Oct 2023 13:52:26 +0000 (14:52 +0100)
committerChris Hofstaedtler <zeha@debian.org>
Mon, 13 Nov 2023 11:48:34 +0000 (12:48 +0100)
commit49d0f2e90cc64849b9f76f7b19c669ed2b68efdd
tree9d3436c842eb1d8c52e3adc993fe2ef41510fca2
parent7465f538dfa2deb1abd81404739f986785e46d15
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>
Gbp-Pq: Topic upstream
Gbp-Pq: Name setterm-resize-uninit-flags.patch
term-utils/setterm.c