[BUG] Likely use after free
when looking at setupPin in ContentAppCommandDelegate
#30155
Labels
Milestone
use after free
when looking at setupPin in ContentAppCommandDelegate
#30155
Reproduction steps
see #29944 (comment)
Code is:
that c-str may not be available once value goes out of scope.
Overall https://github.com/project-chip/connectedhomeip/blob/master/examples/tv-app/android/java/ContentAppCommandDelegate.cpp seems to be using this pattern quite frequently and we should validate if it is safe (and comment on the lifetime of the c_string, as https://open-source-parsers.github.io/jsoncpp-docs/doxygen/class_json_1_1_value.html#a7d99f5dba388cdaa152ce6ef933d64ef says that
operator[]
just returns a value, so I assume the cstring only lives as long as that value lives.Bug prevalence
ALWAYS
GitHub hash of the SDK that was being used
db9fc87
Platform
android
Platform Version(s)
No response
Anything else?
No response
The text was updated successfully, but these errors were encountered: