aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi.dcr@tutanota.com>2024-02-19 16:59:22 +0100
committerXavier Del Campo Romero <xavi.dcr@tutanota.com>2024-02-19 16:59:54 +0100
commit0f889b409e20aea188e88b79b73ded992fc6af33 (patch)
tree044d4954ad27ea9bf84e0385afa826f4050d4a4e
parentc198199a8196913b452461bea1a06438d667f1a2 (diff)
downloadslcl-0f889b409e20aea188e88b79b73ded992fc6af33.tar.gz
main.c: Add missing relative path check
-rw-r--r--main.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/main.c b/main.c
index 3f712d6..a5659a4 100644
--- a/main.c
+++ b/main.c
@@ -393,7 +393,11 @@ end:
static bool path_isrel(const char *const path)
{
- if (!strcmp(path, "..") || !strcmp(path, ".") || strstr(path, "/../"))
+ if (!strcmp(path, "..")
+ || !strcmp(path, ".")
+ || !strcmp(path, "./")
+ || !strcmp(path, "../")
+ || strstr(path, "/../"))
return true;
static const char suffix[] = "/..";