blob: fix handling of custom validator callback
authorFelix Fietkau <nbd@openwrt.org>
Mon, 21 Apr 2014 10:02:30 +0000 (12:02 +0200)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 21 Apr 2014 10:02:32 +0000 (12:02 +0200)
https://dev.openwrt.org/ticket/15638

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
blob.c

diff --git a/blob.c b/blob.c
index 2da7cac7e492819d00e122bcbf3334d0ebb3973e..9b721d14ec645bc0fa2244fda369ee0aba83a4cb 100644 (file)
--- a/blob.c
+++ b/blob.c
@@ -236,7 +236,7 @@ blob_parse(struct blob_attr *attr, struct blob_attr **data, const struct blob_at
                        if (info[id].maxlen && len > info[id].maxlen)
                                continue;
 
-                       if (info[id].validate && !info[id].validate(&info[id], attr))
+                       if (info[id].validate && !info[id].validate(&info[id], pos))
                                continue;
                }