validate the package name for import
authorFelix Fietkau <nbd@openwrt.org>
Sat, 2 Feb 2008 21:54:29 +0000 (22:54 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 2 Feb 2008 21:54:29 +0000 (22:54 +0100)
file.c

diff --git a/file.c b/file.c
index 662c97f..eb05d25 100644 (file)
--- a/file.c
+++ b/file.c
@@ -755,7 +755,7 @@ int uci_load(struct uci_context *ctx, const char *name, struct uci_package **pac
        FILE *file = NULL;
 
        UCI_HANDLE_ERR(ctx);
-       UCI_ASSERT(ctx, name != NULL);
+       UCI_ASSERT(ctx, uci_validate_name(name));
 
        switch (name[0]) {
        case '.':