aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorcdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-17 18:20:22 +0000
committercdn@chromium.org <cdn@chromium.org@4c0a9323-5329-0410-9bdc-e9ce6186880e>2012-04-17 18:20:22 +0000
commit05f02b46edd727425c6627875a4060ee89964079 (patch)
treeb933204c4309dc157ec8e5efc9a141a4f0d0f766 /src
parentExpose a callback to allow crash server implementations to defer the uploadin... (diff)
downloadbreakpad-05f02b46edd727425c6627875a4060ee89964079.tar.xz
Set limit on the number of custom client info entries that can be sent with a crash dump.
BUG=123709 TEST=N/A Review URL: https://breakpad.appspot.com/377004 git-svn-id: http://google-breakpad.googlecode.com/svn/trunk@953 4c0a9323-5329-0410-9bdc-e9ce6186880e
Diffstat (limited to 'src')
-rw-r--r--src/client/windows/crash_generation/client_info.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/client/windows/crash_generation/client_info.cc b/src/client/windows/crash_generation/client_info.cc
index 9c51cda3..60bbac82 100644
--- a/src/client/windows/crash_generation/client_info.cc
+++ b/src/client/windows/crash_generation/client_info.cc
@@ -31,6 +31,7 @@
#include "client/windows/common/ipc_protocol.h"
static const wchar_t kCustomInfoProcessUptimeName[] = L"ptime";
+static const size_t kMaxCustomInfoEntries = 4096;
namespace google_breakpad {
@@ -167,6 +168,9 @@ void ClientInfo::SetProcessUptime() {
}
bool ClientInfo::PopulateCustomInfo() {
+ if (custom_client_info_.count > kMaxCustomInfoEntries)
+ return false;
+
SIZE_T bytes_count = 0;
SIZE_T read_count = sizeof(CustomInfoEntry) * custom_client_info_.count;