1
0
mirror of https://github.com/systemd/systemd.git synced 2024-10-31 16:21:26 +03:00

test: add a testcase that demonstrates a conflict of hashed filename

The commit e64943363a introduces hashed
path at the end of the filename. But we can easily generate the path
which conflicts another path. The issue will be fixed in later commit.
This commit is contained in:
Yu Watanabe 2021-06-04 22:16:02 +09:00
parent efe76b273a
commit 0192864da7

View File

@ -33,6 +33,10 @@ static void test_udev_node_escape_path(void) {
strcpy(b + sizeof(b) - 12, "N3YhcCqFeID"); strcpy(b + sizeof(b) - 12, "N3YhcCqFeID");
test_udev_node_escape_path_one(a, b); test_udev_node_escape_path_one(a, b);
strcpy(a + sizeof(a) - 12 - 9, "N3YhcCqFeID");
test_udev_node_escape_path_one(a, b); /* <-- Ouch. This will pass. Needs to be fixed. */
} }
int main(int argc, char *argv[]) { int main(int argc, char *argv[]) {