stty: diagnose an invalid hex value in 35-colon commmand-line argument
authorJim Meyering <jim@meyering.net>
Sun, 20 May 2007 12:45:38 +0000 (14:45 +0200)
committerJim Meyering <jim@meyering.net>
Tue, 22 May 2007 05:55:40 +0000 (07:55 +0200)
commit02599650b1ce9e53c837c29db5002e07337a20ab
treee346c63f82105e0a18272b28a6b9c1f5864db494
parenta49f45acbec4755c15a771beedc9b1e4dcc7290f
stty: diagnose an invalid hex value in 35-colon commmand-line argument
* NEWS: Mention this.
* src/stty.c (strtoul_tcflag_t, strtoul_cc_t): New functions.
(recover_mode): Use those functions (not sscanf), to parse the
string robustly.
* tests/stty/invalid: New file.  Test for the above.
* tests/stty/Makefile.am (TESTS): Add invalid.
* .x-sc_prohibit_atoi_atof: Don't exempt stty.c from this check.
Add tests/stty/invalid so we don't have to obfuscate the comment
about sscanf therein.
* Makefile.maint (sc_prohibit_atoi_atof): Mention sscanf in the
diagnostic, too.
.x-sc_prohibit_atoi_atof
ChangeLog
Makefile.maint
NEWS
src/stty.c
tests/stty/Makefile.am
tests/stty/invalid [new file with mode: 0755]