From e658252c1883535de8595efe1a1f4a3420e60b6a Mon Sep 17 00:00:00 2001
From: songbuhuang <544824346@qq.com>
Date: Fri, 7 Jul 2023 10:14:40 +0800
Subject: [PATCH] fix outside array bounds

Signed-off-by: songbuhuang <544824346@qq.com>
---
 lib/core-net/client/sort-dns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/core-net/client/sort-dns.c b/lib/core-net/client/sort-dns.c
index c8d6686..db105c5 100644
--- a/lib/core-net/client/sort-dns.c
+++ b/lib/core-net/client/sort-dns.c
@@ -406,7 +406,7 @@ lws_sort_dns_dcomp(const lws_dns_sort_t *da, const lws_dns_sort_t *db)
 	 */
 
 	scopea = lws_ipv6_unicast_scope(to_v6_sa(&da->dest));
-	scopeb = lws_ipv6_unicast_scope(to_v6_sa(&db));
+	scopeb = lws_ipv6_unicast_scope(to_v6_sa(&db->dest));
 	scope_srca = lws_ipv6_unicast_scope(to_v6_sa(&da->source));
 	scope_srcb = lws_ipv6_unicast_scope(to_v6_sa(&db->source));
 
-- 
2.25.1

