From 92ae38e7170d435b3ae54374735e5a4896ece6b4 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 13 Jan 2013 10:10:03 +0100 Subject: [PATCH] add missing file exists check --- file.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/file.c b/file.c index 5de96f8..a6350eb 100644 --- a/file.c +++ b/file.c @@ -176,6 +176,9 @@ uh_path_lookup(struct client *cl, const char *url) exists = !!canonpath(uh_buf, path_phys); uh_buf[i] = ch; + if (!exists) + continue; + snprintf(path_info, sizeof(path_info), "%s", uh_buf + i); break; } -- 2.11.0