]> git.ipfire.org Git - thirdparty/coreutils.git/commit
env: fix address violation with '\v' in -S
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 26 Mar 2021 20:49:49 +0000 (13:49 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 26 Mar 2021 20:50:16 +0000 (13:50 -0700)
commitec6904f0ed55c1796592a33c49aebf47eb5fc6c3
tree7aef592d499a987076efa083636f32b2190d7865
parent4698e284f37844bc9b9f63f00eb556ccaaed5030
env: fix address violation with '\v' in -S

Problem reported by Frank Busse (Bug#47412).
* src/env.c (C_ISSPACE_CHARS): New macro.
(shortopts, build_argv, main): Treate all C-locale space
characters like space and tab, for compatibility with FreeBSD.
(validate_split_str, build_argv, parse_split_string):
Use the C locale, not the current locale, to determine whether a
byte is a space character.
src/env.c