]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commit
include/filepath: add empty path check
authorPatrick Donnelly <pdonnell@ibm.com>
Thu, 14 Nov 2024 18:33:11 +0000 (13:33 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Mon, 17 Mar 2025 19:43:15 +0000 (15:43 -0400)
commit26ecf7c4a5680431c4bc3b5a260ba2df3a5ca6a2
tree34f8d6aba760ce47fffda8361f16502e26d7a9c7
parent102930733bfa4c77fa8a87463a1e505eabcacc67
include/filepath: add empty path check

When passing an empty string to filepath, it would test if the first character
is '/' which is an invalid access through std::string_view.

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
Fixes: https://tracker.ceph.com/issues/66373
(cherry picked from commit e62fce4ec98ab03d9e71bd6e49bf2d8568a8fe71)
src/include/filepath.h