From 9d7dd3759086893a4c0315c22f11964c04e14af8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Fri, 21 Oct 2011 22:48:01 +0200 Subject: [PATCH] fix segfault on import of anonymous sections --- file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/file.c b/file.c index 4eb35b1..3cd0133 100644 --- a/file.c +++ b/file.c @@ -398,7 +398,7 @@ static void uci_parse_config(struct uci_context *ctx, char **str) name = next_arg(ctx, str, false, true); assert_eol(ctx, str); - if (!name) { + if (!name || !name[0]) { ctx->internal = !pctx->merge; UCI_NESTED(uci_add_section, ctx, pctx->package, type, &pctx->section); } else { -- 2.25.1