You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR replaced some uses of strncpy with CopyString which can be a problem when the length value passed does not include the null termination character since CopyString will always add a null terminator.
Specific bug:
examples/chip-tool/commands/clusters/ComplexArgument.h
This manifests itself in chip-tool whenever JSON strings are parsed. The result is that the final character of each string is getting truncated.
Reproduction steps
Bug in the following:
#22708
This PR replaced some uses of strncpy with CopyString which can be a problem when the length value passed does not include the null termination character since CopyString will always add a null terminator.
Specific bug:
examples/chip-tool/commands/clusters/ComplexArgument.h
This manifests itself in chip-tool whenever JSON strings are parsed. The result is that the final character of each string is getting truncated.
Example:
./out/debug/chip-tool applicationlauncher launch-app '{"catalogVendorId": 123, "applicationId": "exampleid"}' 1 1
You will see this command received on the DUT with applicationId field set to "examplei" rather than "exampleid"
It probably makes sense to review the PR for other places where the same problem can happen.
Bug prevalence
always
GitHub hash of the SDK that was being used
master
Platform
core
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: