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;