From 5510ccd7a97e851ead4ae288fbd67339aa4fc5ae Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Tue, 12 Feb 2008 21:46:50 +0100 Subject: [PATCH] add an extra check for uci_lookup --- list.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- 2.11.0