string-util: make sure we eat even half complete words in split()
authorLennart Poettering <lennart@poettering.net>
Thu, 2 Apr 2020 14:36:33 +0000 (16:36 +0200)
committerLennart Poettering <lennart@poettering.net>
Thu, 2 Apr 2020 14:43:36 +0000 (16:43 +0200)
commit29965a2a6e22c9f369e70cffd9ff780d1c1d31a1
tree24f897d8e836ef8bde1bc44e4798bd99495c86ad
parent5fed82c642963f58de96ffc112935ced2d2a3ade
string-util: make sure we eat even half complete words in split()

split() and FOREACH_WORD really should die, and everything be moved to
extract_first_word() and friends, but let's at least make sure that for
the remaining code using it we can't deadlock by not progressing in the
word iteration.

Fixes: #15305
src/basic/string-util.c
src/test/test-strv.c