Skip to content

Commit

Permalink
[chip-tool] Regression from #22708. Revert chip::Platform::CopyString…
Browse files Browse the repository at this point in the history
… to memcpy (it previously uses to be strncpy which was confusing)
  • Loading branch information
vivien-apple committed Oct 17, 2022
1 parent b96f795 commit e090b95
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/chip-tool/commands/clusters/ComplexArgument.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class ComplexArgumentParser

size_t size = strlen(value.asCString());
auto buffer = static_cast<char *>(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;
Expand Down

0 comments on commit e090b95

Please sign in to comment.