Skip to content
Commit eb39a511 authored by Stephen Hines's avatar Stephen Hines
Browse files

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
parent 81a53c76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment