From: Felix Fietkau Date: Tue, 12 Feb 2008 20:46:50 +0000 (+0100) Subject: add an extra check for uci_lookup X-Git-Url: http://git.archive.openwrt.org/?p=project%2Fuci.git;a=commitdiff_plain;h=5510ccd7a97e851ead4ae288fbd67339aa4fc5ae;ds=sidebyside add an extra check for uci_lookup --- diff --git a/list.c b/list.c index 339ad3e..7a703b2 100644 --- a/list.c +++ b/list.c @@ -236,7 +236,7 @@ int uci_lookup(struct uci_context *ctx, struct uci_element **res, struct uci_pac UCI_HANDLE_ERR(ctx); UCI_ASSERT(ctx, res != NULL); UCI_ASSERT(ctx, p != NULL); - UCI_ASSERT(ctx, uci_validate_name(section)); + UCI_ASSERT(ctx, section && uci_validate_name(section)); if (option) UCI_ASSERT(ctx, uci_validate_name(option));