summaryrefslogtreecommitdiff
path: root/libs/androidfw/Util.cpp
diff options
context:
space:
mode:
author Stephen Hines <srhines@google.com> 2022-10-05 18:23:46 -0700
committer Stephen Hines <srhines@google.com> 2022-10-05 18:23:46 -0700
commitd0ac4e1a0df39ca5c382967148a18e789a098c3f (patch)
tree9cb613a66e965a2cf59303c1a2696e5b63d38564 /libs/androidfw/Util.cpp
parent8c10dbf88c241fd4619239c01f3d5984625fb677 (diff)
Fix stack-use-after-scope for a `std::string`
`android::util::Utf16ToUtf8()` actually returns a `std::string` due to the actual conversion to Utf8. `ParseResourceNamedType()` operates on a `StringPiece` of `converted` (the `std::string` returned from that call), and stashes it away for later use. Of course, by the time we're using the `StringPiece` in `parsed_type`, `converted` has already gone out of scope and is invalid to access. Bug: http://b/250827883 Test: ./art/test/testrunner/run_build_test_target.py -j80 art-asan Merged-In: Iea71a5cc84b7dfa96e7dcb549435f8394770a4df Change-Id: Ie03aa417c56df5cedd58bf0b32994d6b4e5395b4
Diffstat (limited to 'libs/androidfw/Util.cpp')
0 files changed, 0 insertions, 0 deletions