aboutsummaryrefslogtreecommitdiff
path: root/src/client/linux/minidump_writer/linux_dumper.cc
diff options
context:
space:
mode:
authorkmixter@chromium.org <kmixter@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-12-08 22:26:20 +0000
committerkmixter@chromium.org <kmixter@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2010-12-08 22:26:20 +0000
commitb5dfa2834d37a669cce3ca62cb7a56b713d368a2 (patch)
treeac4713c932d871f6f0c5f67926f4917d3f697045 /src/client/linux/minidump_writer/linux_dumper.cc
parentPropagate failure if http uploads fail with http error codes. (diff)
downloadbreakpad-b5dfa2834d37a669cce3ca62cb7a56b713d368a2.tar.xz
Reuse code and fix inconsistent array boundaries.
R=ted.mielczarek Review URL: http://breakpad.appspot.com/237001 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@740 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src/client/linux/minidump_writer/linux_dumper.cc')
-rw-r--r--src/client/linux/minidump_writer/linux_dumper.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/client/linux/minidump_writer/linux_dumper.cc b/src/client/linux/minidump_writer/linux_dumper.cc
index 4885136e..6e6f4cfa 100644
--- a/src/client/linux/minidump_writer/linux_dumper.cc
+++ b/src/client/linux/minidump_writer/linux_dumper.cc
@@ -246,7 +246,7 @@ LinuxDumper::ElfFileIdentifierForMapping(unsigned int mapping_id,
void*
LinuxDumper::FindBeginningOfLinuxGateSharedLibrary(const pid_t pid) const {
- char auxv_path[80];
+ char auxv_path[NAME_MAX];
BuildProcPath(auxv_path, pid, "auxv");
// If BuildProcPath errors out due to invalid input, we'll handle it when
@@ -276,7 +276,7 @@ LinuxDumper::FindBeginningOfLinuxGateSharedLibrary(const pid_t pid) const {
bool
LinuxDumper::EnumerateMappings(wasteful_vector<MappingInfo*>* result) const {
- char maps_path[80];
+ char maps_path[NAME_MAX];
BuildProcPath(maps_path, pid_, "maps");
// linux_gate_loc is the beginning of the kernel's mapping of
@@ -338,7 +338,7 @@ LinuxDumper::EnumerateMappings(wasteful_vector<MappingInfo*>* result) const {
// Parse /proc/$pid/task to list all the threads of the process identified by
// pid.
bool LinuxDumper::EnumerateThreads(wasteful_vector<pid_t>* result) const {
- char task_path[80];
+ char task_path[NAME_MAX];
BuildProcPath(task_path, pid_, "task");
const int fd = sys_open(task_path, O_RDONLY | O_DIRECTORY, 0);
@@ -373,7 +373,7 @@ bool LinuxDumper::EnumerateThreads(wasteful_vector<pid_t>* result) const {
// available.
bool LinuxDumper::ThreadInfoGet(pid_t tid, ThreadInfo* info) {
assert(info != NULL);
- char status_path[80];
+ char status_path[NAME_MAX];
BuildProcPath(status_path, tid, "status");
const int fd = open(status_path, O_RDONLY);