]> git.ipfire.org Git - thirdparty/make.git/commit
[SV 59881] Handle vertical TAB consistently
authorPaul Smith <psmith@gnu.org>
Sun, 14 Mar 2021 23:12:24 +0000 (19:12 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 15 Mar 2021 05:16:32 +0000 (01:16 -0400)
commitc66ec5fa20d33abf134892520179e32c2728e9b8
tree75788318da627e9cb6ac3b55bd4a0ee146f52556
parentda6fc6aae2e26b24073591b18ca92e42dda20d8c
[SV 59881] Handle vertical TAB consistently

While parsing makefiles get_next_mword() was treating VTAB as a word
character rather than a word separator.  However, when using
find_next_token(), for example in patsubst_expand_pat(), we treated
VTAB as a word separator causing multiple words to appear where we
didn't expect them.

* src/makeint.h (END_OF_TOKEN): Change from a loop to a boolean check.
* src/misc.c (end_of_token): Move the loop here.
* src/read.c (get_next_mword): Skip whitespace, not just blank, to
find the start of the word and use END_OF_TOKEN() to decide when the
current word is finished.
src/makeint.h
src/misc.c
src/read.c