Skip to content
Commit ecd849ed authored by Pavel Labath's avatar Pavel Labath
Browse files

Fix a use-after-free in GDBRemoteCommunicationServerLLGS

Although it's called "GetString", StreamString::GetString actually
returns a StringRef. Creating a json object with a StringRef does not
make a copy, which means the StringRef will be dangling as soon as the
underlying stream is destroyed. Add a .str() to force the json object to
hold a copy of the string.

This fixes nearly every test on linux.

llvm-svn: 373572
parent c0292744
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