diff options
| author | 2022-10-04 02:36:07 -0700 | |
|---|---|---|
| committer | 2022-10-04 03:08:39 -0700 | |
| commit | eb39a511944e20112208ba6feb1d92f15c467999 (patch) | |
| tree | c0bf8f9f090e6bc87cdf21386a23e6d2f15c8ae2 /libs/androidfw/StringPool.cpp | |
| parent | 81a53c761a4d0586287301c45f708d828090d191 (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
Change-Id: Iea71a5cc84b7dfa96e7dcb549435f8394770a4df
Diffstat (limited to 'libs/androidfw/StringPool.cpp')
0 files changed, 0 insertions, 0 deletions