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 662c97f5b003024fde65f12bea538fdb14e401f2..eb05d25859f773c32ee7ce6b4f4a0f5aea2d0dc7 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 '.':