From: Felix Fietkau Date: Sun, 3 Feb 2008 00:17:14 +0000 (+0100) Subject: fix filename validation X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=1188f6ac8a938d88fb8d40d9ca5e2564d5c02042;p=uci.git fix filename validation --- 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;