service: fix service_handle_event array
authorPierre Lebleu <pme.lebleu@gmail.com>
Wed, 25 Oct 2017 15:43:16 +0000 (17:43 +0200)
committerHans Dedecker <dedeckeh@gmail.com>
Sat, 28 Oct 2017 08:28:16 +0000 (10:28 +0200)
The array concerning the "config.change" is __VALIDATE_MAX length,
not __DATA_MAX length.

Signed-off-by: Pierre Lebleu <pme.lebleu@gmail.com>
service/service.c

index 9c798aae67c97f1ef6c75ffba8d215d6dcad185e..ce730bc085f99580a1c43a2b0b2b012c7079f104 100644 (file)
@@ -536,7 +536,7 @@ service_handle_event(struct ubus_context *ctx, struct ubus_object *obj,
        trigger_event(event, tb[EVENT_DATA]);
 
        if (!strcmp(event, "config.change")) {
-               struct blob_attr *tb2[__DATA_MAX];
+               struct blob_attr *tb2[__VALIDATE_MAX];
 
                blobmsg_parse(validate_policy, __VALIDATE_MAX, tb2,
                              blobmsg_data(tb[EVENT_DATA]), blobmsg_len(tb[EVENT_DATA]));