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) (#23231)
  • Loading branch information
vivien-apple authored Oct 17, 2022
1 parent 8e9f997 commit 083c9f5
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 083c9f5

Please sign in to comment.