Fix a segmentation fault bug in MinidumpAssertion::Read().

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@702 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
SiyangXie@gmail.com 2010-09-30 00:05:25 +00:00
parent 82a0188946
commit de2c055770

View file

@ -2935,6 +2935,7 @@ bool MinidumpAssertion::Read(u_int32_t expected_size) {
scoped_ptr<string> new_expression(UTF16ToUTF8(expression_utf16,
minidump_->swap()));
if (new_expression.get())
expression_ = *new_expression;
}
@ -2947,6 +2948,7 @@ 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()));
if (new_function.get())
function_ = *new_function;
}
@ -2959,6 +2961,7 @@ 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()));
if (new_file.get())
file_ = *new_file;
}