aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-04-15 19:00:28 +0000
committerjimblandy <jimblandy@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-04-15 19:00:28 +0000
commit1e73bad86e1e65968ef9cb4a7349b4249a28bbc3 (patch)
treef319d5ff219d1b97f9e130c086275263355fd615 /src
parentMac now takes response code into account when determining success of a symupl... (diff)
downloadbreakpad-1e73bad86e1e65968ef9cb4a7349b4249a28bbc3.tar.xz
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
Diffstat (limited to 'src')
-rw-r--r--src/processor/minidump_stackwalk.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/processor/minidump_stackwalk.cc b/src/processor/minidump_stackwalk.cc
index 4f040476..2c3ab359 100644
--- a/src/processor/minidump_stackwalk.cc
+++ b/src/processor/minidump_stackwalk.cc
@@ -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;
}