diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-02-22 06:30:26 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-02-22 06:30:26 -0800 |
commit | de1cce6d446c38fde590cac2531560742d446043 (patch) | |
tree | b598b1328736bd5b4387a8c8029034d970375e11 | |
parent | aad381bc6ce5458ef2483238066ae7fe1577d508 (diff) | |
download | txr-de1cce6d446c38fde590cac2531560742d446043.tar.gz txr-de1cce6d446c38fde590cac2531560742d446043.tar.bz2 txr-de1cce6d446c38fde590cac2531560742d446043.zip |
termios: overflow in initialization on 32 bits.
* termios.c (termios_init): The CMSPAR and CRTSCTS constants
cannot be passed to num_fast; they are out of range, and so
the corresponding cmspar and crtscts variables will end up
with garbage values.
-rw-r--r-- | termios.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -552,10 +552,10 @@ void termios_init(void) reg_varl(intern(lit("cbaudex"), user_package), num_fast(CBAUDEX)); #endif #ifdef CMSPAR - reg_varl(intern(lit("cmspar"), user_package), num_fast(CMSPAR)); + reg_varl(intern(lit("cmspar"), user_package), num(CMSPAR)); #endif #ifdef CRTSCTS - reg_varl(intern(lit("crtscts"), user_package), num_fast(CRTSCTS)); + reg_varl(intern(lit("crtscts"), user_package), num(CRTSCTS)); #endif /* lflag bits */ reg_varl(intern(lit("isig"), user_package), num_fast(ISIG)); |