]> git.ipfire.org Git - thirdparty/coreutils.git/commit
stty: validate ispeed and ospeed arguments
authorPádraig Brady <P@draigBrady.com>
Tue, 30 Aug 2022 23:17:21 +0000 (00:17 +0100)
committerPádraig Brady <P@draigBrady.com>
Wed, 31 Aug 2022 00:03:33 +0000 (01:03 +0100)
commitf87a78f334f25cbaac89507c8fda24d4f780b908
treefe4205b561aaaf4e4c2a7c0de84c2a0a60fbf7e9
parent3a1c328cd55f427a74f16cda8513bedb7c153fd8
stty: validate ispeed and ospeed arguments

* src/stty.c (apply_settings): Validate [io]speed arguments
against the internal accepted set.
(set_speed): Check the cfset[io]speed() return value so
that we validate against the system supported set.
* tests/misc/stty-invalid.sh: Add a test case.
* NEWS: Mention the bug fix.
Reported in https://bugs.debian.org/1018790
NEWS
src/stty.c
tests/misc/stty-invalid.sh