From 1188f6ac8a938d88fb8d40d9ca5e2564d5c02042 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sun, 3 Feb 2008 01:17:14 +0100 Subject: [PATCH] fix filename validation --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.c b/file.c index 803e912..6cc2eae 100644 --- a/file.c +++ b/file.c @@ -781,7 +781,6 @@ int uci_load(struct uci_context *ctx, const char *name, struct uci_package **pac FILE *file = NULL; UCI_HANDLE_ERR(ctx); - UCI_ASSERT(ctx, uci_validate_name(name)); switch (name[0]) { case '.': @@ -797,6 +796,7 @@ int uci_load(struct uci_context *ctx, const char *name, struct uci_package **pac break; default: /* config in /etc/config */ + UCI_ASSERT(ctx, uci_validate_name(name)); filename = uci_config_path(ctx, name); confdir = true; break; -- 2.25.1