From 0f889b409e20aea188e88b79b73ded992fc6af33 Mon Sep 17 00:00:00 2001 From: Xavier Del Campo Romero Date: Mon, 19 Feb 2024 16:59:22 +0100 Subject: [PATCH] main.c: Add missing relative path check --- main.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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[] = "/..";