aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-09-26 17:46:28 +0000
committerthestig@chromium.org <thestig@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-09-26 17:46:28 +0000
commit5edf194493487d464531db0e7fd7df2489603eea (patch)
treea448e02f5b003edb8db3630bc36c8775e5ee660d /src
parentFix type in string_conversion.cc introduced in r1046 (diff)
downloadbreakpad-5edf194493487d464531db0e7fd7df2489603eea.tar.xz
Fix a parsing error in the Linux dump writer.
Review URL: https://breakpad.appspot.com/464002 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@1050 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/linux/minidump_writer/minidump_writer.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/src/client/linux/minidump_writer/minidump_writer.cc b/src/client/linux/minidump_writer/minidump_writer.cc
index add2d3f5..02f6c3e2 100644
--- a/src/client/linux/minidump_writer/minidump_writer.cc
+++ b/src/client/linux/minidump_writer/minidump_writer.cc
@@ -62,9 +62,6 @@
#include <algorithm>
-#include "client/minidump_file_writer.h"
-#include "google_breakpad/common/minidump_format.h"
-
#include "client/linux/handler/exception_handler.h"
#include "client/linux/minidump_writer/line_reader.h"
#include "client/linux/minidump_writer/linux_dumper.h"
@@ -1008,7 +1005,8 @@ class MinidumpWriter {
for (int i = 0;;) {
ElfW(Dyn) dyn;
dynamic_length += sizeof(dyn);
- dumper_->CopyFromProcess(&dyn, GetCrashThread(), dynamic+i++, sizeof(dyn));
+ dumper_->CopyFromProcess(&dyn, GetCrashThread(), dynamic+i++,
+ sizeof(dyn));
if (dyn.d_tag == DT_DEBUG) {
r_debug = reinterpret_cast<struct r_debug*>(dyn.d_un.d_ptr);
continue;
@@ -1083,7 +1081,7 @@ class MinidumpWriter {
debug.get()->ldbase = (void*)debug_entry.r_ldbase;
debug.get()->dynamic = dynamic;
- char *dso_debug_data = new char[dynamic_length];
+ char* dso_debug_data = new char[dynamic_length];
dumper_->CopyFromProcess(dso_debug_data, GetCrashThread(), dynamic,
dynamic_length);
debug.CopyIndexAfterObject(0, dso_debug_data, dynamic_length);
@@ -1210,8 +1208,14 @@ class MinidumpWriter {
if (space_ptr != value)
continue;
+ // skip past the colon and all the spaces that follow
+ do {
+ value++;
+ } while (my_isspace(*value));
+
uintptr_t val;
- my_read_decimal_ptr(&val, ++value);
+ if (my_read_decimal_ptr(&val, value) == value)
+ continue;
entry->value = static_cast<int>(val);
entry->found = true;
}
@@ -1223,7 +1227,7 @@ class MinidumpWriter {
if (!value)
goto popline;
- // skip ':" and all the spaces that follows
+ // skip past the colon and all the spaces that follow
do {
value++;
} while (my_isspace(*value));