]> git.ipfire.org Git - thirdparty/systemd.git/commit
path-util: use path_find_first_component() in path_startswith()
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 1 May 2021 11:17:16 +0000 (20:17 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Fri, 28 May 2021 04:41:23 +0000 (13:41 +0900)
commit63f11e354a3e5d64ee4cabb7bb584307d237fee4
treef33ac43659eceaa613da6a82cc999652ea6dc4b7
parent0b8696256ba3cd76af2a34184c7a95844304d6eb
path-util: use path_find_first_component() in path_startswith()

This makes path_startswith() stricter. If one of the path component in
arguments is longer than NAME_MAX, it returns NULL.
src/basic/path-util.c
src/basic/path-util.h
src/test/test-path-util.c