summaryrefslogtreecommitdiff
path: root/tools/aapt2/java/JavaClassGenerator.cpp
diff options
context:
space:
mode:
authorSiarhei Vishniakou <svv@google.com>2018-01-04 13:00:48 -0800
committerSiarhei Vishniakou <svv@google.com>2018-01-04 13:00:48 -0800
commitd6058f44f47b2379200bc69aecbcf34fe2b3f873 (patch)
tree27b8d5c4732cdedf99bb67accff990433345d5bf /tools/aapt2/java/JavaClassGenerator.cpp
parentb944bc86078146c523d58d2b70d56044be3bf216 (diff)
Do not return pointer to freed memory
Since the code was changed to use std::string instead of String8, it is no longer safe to pass a raw pointer to internal memory of the string object, since std::string creates a copy even if the data itself is not being modified. Instead, return std::string to the calling function and let the function access the pointer when necessary. Bug: 71541263 Test: boot up asan build on pixel 2 xl, then interact with google calendar and chrome. Observe no crashes with the patch. Change-Id: I6af2d23985d0553dd0707ad985f7f1e7b2240611
Diffstat (limited to 'tools/aapt2/java/JavaClassGenerator.cpp')
0 files changed, 0 insertions, 0 deletions