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
TLVWriter has multiple complex initialization paths:
OpenContainer
Init(xxxx) --> several methods
Default-constructed.
There are many implementation details of buffering that are directly exposed by TLVWriter, which makes fixes/refactors much more difficult, since there is no common logic to make sure all changes propagate all fields properly.
Some prior dynamic analyses have found uninitialized accesses, which were fixed, so we would benefit from clearing-up the different cases of init of TLVWrite.
The text was updated successfully, but these errors were encountered:
- It was found through static analysis that in some cases, TLVWriters
did not have all fields initialized and this led to no errors, but
possibly could lead to bad states.
- None of the code making use of uninitialized TLVWriters was found
in the SDK, but there may be usages.
- In adding the checks, marked several areas that could be improved
in TLVWriter data access/management.
Issue project-chip#30825
Testing done:
- All tests still pass.
- There is never uninitialized used of a TLVWriter.
* Ensure fields are always initialized in TLVWriters
- It was found through static analysis that in some cases, TLVWriters
did not have all fields initialized and this led to no errors, but
possibly could lead to bad states.
- None of the code making use of uninitialized TLVWriters was found
in the SDK, but there may be usages.
- In adding the checks, marked several areas that could be improved
in TLVWriter data access/management.
Issue #30825
Testing done:
- All tests still pass.
- There is never uninitialized used of a TLVWriter.
---------
Co-authored-by: [email protected] <[email protected]>
Co-authored-by: Restyled.io <[email protected]>
TLVWriter
has multiple complex initialization paths:OpenContainer
Init(xxxx)
--> several methodsThere are many implementation details of buffering that are directly exposed by TLVWriter, which makes fixes/refactors much more difficult, since there is no common logic to make sure all changes propagate all fields properly.
Some prior dynamic analyses have found uninitialized accesses, which were fixed, so we would benefit from clearing-up the different cases of init of TLVWrite.
The text was updated successfully, but these errors were encountered: