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
This commit is contained in:
cdn@chromium.org 2012-04-17 18:20:22 +00:00
parent 9a3de4160b
commit 05f02b46ed

View file

@ -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;