From c1286a7553e08915a8168f5efe203a9e921f22d8 Mon Sep 17 00:00:00 2001 From: shaozhimin Date: Thu, 23 May 2024 20:28:31 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E8=93=9D=E7=89=99=E6=AE=B5?= =?UTF-8?q?=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hardware/libkybluetooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hardware/libkybluetooth.c b/src/hardware/libkybluetooth.c index 2aaff9e..fceca33 100644 --- a/src/hardware/libkybluetooth.c +++ b/src/hardware/libkybluetooth.c @@ -672,7 +672,7 @@ char** kdk_bluetooth_get_device_name(int id) if (!tmp) goto err_out; con_name = tmp; - con_name[num] = (char *)calloc(1, sizeof(result)); + con_name[num] = (char *)calloc(1, strlen(result) + 1); if (!con_name[num]) { free(tmp);