aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-09-30 00:05:25 +0000
committerSiyangXie@gmail.com <SiyangXie@gmail.com@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-09-30 00:05:25 +0000
commitde2c055770751e7ffc42be3f97c5c7a3a99f9056 (patch)
tree6762db11025889205eed1b60bbb9689816027c18
parentadd top_srcdir/src to CPPFLAGS for all unittests to fix compilation of unitte... (diff)
downloadbreakpad-de2c055770751e7ffc42be3f97c5c7a3a99f9056.tar.xz
Fix a segmentation fault bug in MinidumpAssertion::Read().
git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@702 4c0a9323-5329-0410-9bdc-e9ce6186880e
-rw-r--r--src/processor/minidump.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/processor/minidump.cc b/src/processor/minidump.cc
index 0414a822..f57001a2 100644
--- a/src/processor/minidump.cc
+++ b/src/processor/minidump.cc
@@ -2935,7 +2935,8 @@ bool MinidumpAssertion::Read(u_int32_t expected_size) {
scoped_ptr<string> new_expression(UTF16ToUTF8(expression_utf16,
minidump_->swap()));
- expression_ = *new_expression;
+ if (new_expression.get())
+ expression_ = *new_expression;
}
// assertion
@@ -2947,7 +2948,8 @@ bool MinidumpAssertion::Read(u_int32_t expected_size) {
memcpy(&function_utf16[0], &assertion_.function[0], byte_length);
scoped_ptr<string> new_function(UTF16ToUTF8(function_utf16,
minidump_->swap()));
- function_ = *new_function;
+ if (new_function.get())
+ function_ = *new_function;
}
// file
@@ -2959,7 +2961,8 @@ bool MinidumpAssertion::Read(u_int32_t expected_size) {
memcpy(&file_utf16[0], &assertion_.file[0], byte_length);
scoped_ptr<string> new_file(UTF16ToUTF8(file_utf16,
minidump_->swap()));
- file_ = *new_file;
+ if (new_file.get())
+ file_ = *new_file;
}
if (minidump_->swap()) {