From 0e0f93f5db9b3e4e1cceb17741abce175221c36f Mon Sep 17 00:00:00 2001 From: "roman.khlopkov" <roman.khlopkov@demlabs.net> Date: Thu, 28 Mar 2024 14:22:37 +0300 Subject: [PATCH] [*] Segfault fix --- dap-sdk | 2 +- modules/net/dap_chain_net_balancer.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dap-sdk b/dap-sdk index 6f328918f8..f8a6d5cd7f 160000 --- a/dap-sdk +++ b/dap-sdk @@ -1 +1 @@ -Subproject commit 6f328918f8081071e0bdb8466515f5c6f4981cb4 +Subproject commit f8a6d5cd7f5d4610b7f78fd8cd5caea075e0ab16 diff --git a/modules/net/dap_chain_net_balancer.c b/modules/net/dap_chain_net_balancer.c index a1427d078f..b6e8c1195c 100644 --- a/modules/net/dap_chain_net_balancer.c +++ b/modules/net/dap_chain_net_balancer.c @@ -129,7 +129,7 @@ dap_link_info_t *s_get_links_info_list(dap_chain_net_t *a_net, size_t *a_count, dap_link_info_t *l_tail = s_get_links_info_list(a_net, &l_tail_count, false); if (l_tail && l_tail_count) { l_ret = DAP_REALLOC(l_ret, sizeof(dap_link_info_t) * (l_count + l_tail_count)); - memcpy(l_ret + sizeof(dap_link_info_t) * l_count, l_tail, sizeof(dap_link_info_t) * l_tail_count); + memcpy(l_ret + l_count, l_tail, sizeof(dap_link_info_t) * l_tail_count); l_count += l_tail_count; DAP_DELETE(l_tail); } -- GitLab