mirror of
https://github.com/yuzu-emu/breakpad.git
synced 2024-11-28 08:54:21 +01:00
Breakpad stack walker: remove embedded newlines from module names.
pdb filenames in crash reports may contain embedded newlines. When minidump-stackwalk prints these lines, it ends up with: Module|olek8r4u.dll|6.0.6000.16386|\\xc2\\xeb\\x17\\x04J\\xb6:\\xbaT\\xf3\\xef\\xe8Y\\x90\\x86\\xaa\\xe5\\x16n\\xb1\\x80\\x85\\t\\x12!\\x16\\x0f\\x98\\xf8\\x89\\x16"\\x96\\xd4\\x84\\x88\\xea\\xe3\\r\\r\\x1b\\xca\\x85*^h\\xf5\\xdc\n\\xd9\\xf4}j\\x1d7\\xe39o\\x1f\\xc5\\xc4\\xa6x\\x8ba\\xe8\\xd6K\\x89H\\xe1\\xff\\xe7\\xf5\\xf0Y\\xfd\\xf5\\xdbu\\x0c\\x07\\x86\\xed|29E0B04FCCBE47EB86A6C819E8B89D051|0x00f60000|0x00ff2fff|0\n Which has an embedded newline and the machine parser can't handle it. This patch just strips the embedded newline, just as we strip embedded | separator characters. a=bsmedberg, r=jimblandy git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@571 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
parent
a62dc27d23
commit
1e73bad86e
@ -99,6 +99,10 @@ static string StripSeparator(const string &original) {
|
||||
while ((position = result.find(kOutputSeparator, position)) != string::npos) {
|
||||
result.erase(position, 1);
|
||||
}
|
||||
position = 0;
|
||||
while ((position = result.find('\n', position)) != string::npos) {
|
||||
result.erase(position, 1);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user