Merge pull request #28474 from yuwata/chase-fix

chase: handle ".." more carefully
This commit is contained in:
Daan De Meyer
2023-07-31 10:46:19 +02:00
committed by GitHub
3 changed files with 101 additions and 22 deletions
+5
View File
@@ -73,6 +73,11 @@ TEST(chase) {
assert_se(path_equal(result, "/usr"));
result = mfree(result);
r = chase(p, "/.//../../../", 0, &result, NULL);
assert_se(r > 0);
assert_se(path_equal(result, "/usr"));
result = mfree(result);
pslash = strjoina(p, "/");
r = chase(pslash, NULL, 0, &result, NULL);
assert_se(r > 0);