From 05f02b46edd727425c6627875a4060ee89964079 Mon Sep 17 00:00:00 2001 From: "cdn@chromium.org" Date: Tue, 17 Apr 2012 18:20:22 +0000 Subject: 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 --- src/client/windows/crash_generation/client_info.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/client/windows') 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; -- cgit v1.2.1