projects
/
project
/
uci.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
179b6f5
)
add an extra option check for tuple parsing
author
Felix
<nbd@openwrt.org>
Mon, 25 Aug 2008 23:20:43 +0000
(
01:20
+0200)
committer
Felix
<nbd@openwrt.org>
Mon, 25 Aug 2008 23:20:43 +0000
(
01:20
+0200)
util.c
patch
|
blob
|
history
diff --git
a/util.c
b/util.c
index d5bcd8a7b99a05a1c9a16e575e37dfca6fcc4c0a..7f37e882fc5348bc1254de3a87f6473d95d2f485 100644
(file)
--- a/
util.c
+++ b/
util.c
@@
-120,6
+120,7
@@
static void uci_alloc_parse_context(struct uci_context *ctx)
int uci_parse_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str)
{
char *last = NULL;
+ char *tmp;
UCI_HANDLE_ERR(ctx);
UCI_ASSERT(ctx, str);
@@
-153,6
+154,10
@@
int uci_parse_ptr(struct uci_context *ctx, struct uci_ptr *ptr, char *str)
ptr->target = UCI_TYPE_OPTION;
}
+ tmp = strsep(&str, ".");
+ if (tmp)
+ goto error;
+
lastval:
if (ptr->package && !uci_validate_str(ptr->package, false))
goto error;