X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=delta.c;h=386167db4cd1500b56f80d0e3d29f82594cafa2a;hb=4c8b4d6efc8302b508d261573351fffb75bd98c2;hp=e9c79ab5be07b80058869b8a4ba69c04cee3de44;hpb=5d2bf09ec594d97eb9284b8c721dbfe10b81a6f6;p=project%2Fuci.git diff --git a/delta.c b/delta.c index e9c79ab..386167d 100644 --- a/delta.c +++ b/delta.c @@ -163,6 +163,9 @@ static inline int uci_parse_delta_tuple(struct uci_context *ctx, struct uci_ptr int c; UCI_INTERNAL(uci_parse_argument, ctx, ctx->pctx->file, &str, &arg); + if (str && *str) { + goto error; + } for (c = 0; c <= __UCI_CMD_LAST; c++) { if (uci_command_char[c] == *arg) break; @@ -179,6 +182,9 @@ static inline int uci_parse_delta_tuple(struct uci_context *ctx, struct uci_ptr goto error; if (ptr->flags & UCI_LOOKUP_EXTENDED) goto error; + if (c != UCI_CMD_REMOVE && !ptr->value) { + goto error; + } switch(c) { case UCI_CMD_REORDER: