Fix broken build of mac crash report tool.

git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@723 4c0a9323-5329-0410-9bdc-e9ce6186880e
This commit is contained in:
SiyangXie@gmail.com 2010-11-03 23:49:41 +00:00
parent 3382d1e0a6
commit 3b4ac42ff8

View file

@ -171,14 +171,13 @@ OnDemandSymbolSupplier::GetCStringSymbolData(const CodeModule *module,
symbol_file, symbol_file,
&symbol_data_string); &symbol_data_string);
if (result == FOUND) { if (result == FOUND) {
unsigned int size = symbol_data_string.size() + 1; *symbol_data = new char[symbol_data_string.size() + 1];
*symbol_data = new char[size];
if (*symbol_data == NULL) { if (*symbol_data == NULL) {
// Should return INTERRUPT on memory allocation failure. // Should return INTERRUPT on memory allocation failure.
return INTERRUPT; return INTERRUPT;
} }
strcpy(*symbol_data, symbol_data_string.c_str()); strcpy(*symbol_data, symbol_data_string.c_str());
memory_buffers_.insert(make_pair(module->code_file(), *symbol_data); memory_buffers_.insert(make_pair(module->code_file(), *symbol_data));
} }
return result; return result;
} }