From 33b2abf6310abbadc541a0e1913080e048174324 Mon Sep 17 00:00:00 2001 From: John Crispin Date: Tue, 22 Sep 2015 06:20:55 +0200 Subject: [PATCH] fix off-by-one in acl match iteration Signed-off-by: John Crispin --- ubusd_acl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ubusd_acl.c b/ubusd_acl.c index 1d965c0..491b233 100644 --- a/ubusd_acl.c +++ b/ubusd_acl.c @@ -104,7 +104,7 @@ ubusd_acl_check(struct ubus_client *cl, const char *obj, return 0; acl = avl_find_ge_element(&ubusd_acls, obj, acl, avl); - while (acl && !avl_is_last(&ubusd_acls, &acl->avl)) { + while (acl) { int diff = ubusd_acl_match_path(obj, acl->avl.key, NULL); if (diff) -- 2.30.2