From 714c75c47ac11770c2b638ad82631a57696c3a3c Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Thu, 31 Jul 2008 18:13:57 +0200 Subject: [PATCH] another one --- util.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index c0d46a2..e1ef585 100644 --- a/util.c +++ b/util.c @@ -136,7 +136,8 @@ int uci_parse_tuple(struct uci_context *ctx, char *str, char **package, char **s *section = strsep(&str, "."); *option = NULL; - *value = NULL; + if (value) + *value = NULL; if (!*section) goto lastval; @@ -158,7 +159,7 @@ lastval: goto error; if (*option && !uci_validate_name(*option)) goto error; - if (*value && !uci_validate_text(*value)) + if (value && *value && !uci_validate_text(*value)) goto error; goto done; -- 2.41.1