From 1e73bad86e1e65968ef9cb4a7349b4249a28bbc3 Mon Sep 17 00:00:00 2001 From: jimblandy Date: Thu, 15 Apr 2010 19:00:28 +0000 Subject: 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 --- src/processor/minidump_stackwalk.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/processor') 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; } -- cgit v1.2.1