]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: don't return root if path contains // or ending /
authorSøren Holm <sgh@sgh.dk>
Fri, 26 Sep 2014 16:35:11 +0000 (18:35 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 1 Oct 2014 08:01:35 +0000 (10:01 +0200)
commit41510d26ddd9a4c83f8589dded539e2985535dcf
tree5c848b964f9518e965a32c0d7ffff02eb2e0ddb7
parent42f00a7df509ed7837c0177830ed71f134bc3e15
libmount: don't return root if path contains // or ending /

If the path fx. is /foo/bar/ the initial stripoff will replace the last slash
with \0 and return a pointer to that exact \0 character. The same thing will
happen if the path contains // somewhere.

Signed-off-by: Søren Holm <sgh@sgh.dk>
libmount/src/tab.c