From f68ee07880733134e6cfd4953dc49ee9d61301fe Mon Sep 17 00:00:00 2001 From: Marius Vlad Date: Tue, 5 Nov 2019 17:08:17 +0200 Subject: [PATCH] weston-log: Avoid prefix-matching the scope name when checking for a pending subscription It limits to scope name to an exact match. Signed-off-by: Marius Vlad Reported-by: Pekka Paalanen --- libweston/weston-log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libweston/weston-log.c b/libweston/weston-log.c index 9415f053..b2c4597c 100644 --- a/libweston/weston-log.c +++ b/libweston/weston-log.c @@ -124,7 +124,7 @@ find_pending_subscription(struct weston_log_context *log_ctx, struct weston_log_subscription *sub; wl_list_for_each(sub, &log_ctx->pending_subscription_list, source_link) - if (!strncmp(sub->scope_name, scope_name, strlen(scope_name))) + if (!strcmp(sub->scope_name, scope_name)) return sub; return NULL;