From 083c9f5b261e62f26fe043e662ccc17e0f927cf5 Mon Sep 17 00:00:00 2001 From: Vivien Nicolas Date: Mon, 17 Oct 2022 21:18:43 +0200 Subject: [PATCH] [chip-tool] Regression from #22708. Revert chip::Platform::CopyString to memcpy (it previously uses to be strncpy which was confusing) (#23231) --- examples/chip-tool/commands/clusters/ComplexArgument.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/chip-tool/commands/clusters/ComplexArgument.h b/examples/chip-tool/commands/clusters/ComplexArgument.h index c3937581d76653..8684116893cd12 100644 --- a/examples/chip-tool/commands/clusters/ComplexArgument.h +++ b/examples/chip-tool/commands/clusters/ComplexArgument.h @@ -196,7 +196,7 @@ class ComplexArgumentParser size_t size = strlen(value.asCString()); auto buffer = static_cast(chip::Platform::MemoryCalloc(size, sizeof(char))); - chip::Platform::CopyString(buffer, size, value.asCString()); + memcpy(buffer, value.asCString(), size); request = chip::CharSpan(buffer, size); return CHIP_NO_ERROR;