aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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[] = "/..";