Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d6058f44 authored by Siarhei Vishniakou's avatar Siarhei Vishniakou
Browse files

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
parent b944bc86
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