nulstr-util: use memdup_suffix0() where appropriate
authorLennart Poettering <lennart@poettering.net>
Fri, 11 Nov 2022 21:04:37 +0000 (22:04 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 13 Nov 2022 08:39:08 +0000 (17:39 +0900)
commit1ef970377485499b1b62e1150fec044aa852b7a1
treebee475b2736f014769a0d3d5b0377f8562c38554
parenteecac5053b1aff31f43df7aa053a4561b5a8740c
nulstr-util: use memdup_suffix0() where appropriate

if the nulstr is not nul-terminated, we shouldn't use strndup() but
memdup_suffix0(), to not trip up static analyzers which imply we are
duping a string here.
src/basic/nulstr-util.c