summaryrefslogtreecommitdiffstats
path: root/components/breakpad/app
diff options
context:
space:
mode:
authorrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 13:11:35 +0000
committerrsesek@chromium.org <rsesek@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-30 13:11:35 +0000
commit09557b02694820d23fe373158850a6124cd00dba (patch)
treedb271641af8d1063f6d0e3ecd4f843a0d0bb98cf /components/breakpad/app
parent5f958140ef8ab15124bc442e08a2428b209b9e11 (diff)
downloadchromium_src-09557b02694820d23fe373158850a6124cd00dba.zip
chromium_src-09557b02694820d23fe373158850a6124cd00dba.tar.gz
chromium_src-09557b02694820d23fe373158850a6124cd00dba.tar.bz2
Fix NULL deref when running with --disable-breakpad on Windows.
BUG=307708 R=jochen@chromium.org Review URL: https://codereview.chromium.org/50563007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231822 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'components/breakpad/app')
-rw-r--r--components/breakpad/app/breakpad_win.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/components/breakpad/app/breakpad_win.cc b/components/breakpad/app/breakpad_win.cc
index 84ee9bb..e2fca70 100644
--- a/components/breakpad/app/breakpad_win.cc
+++ b/components/breakpad/app/breakpad_win.cc
@@ -421,6 +421,9 @@ long WINAPI ServiceExceptionFilter(EXCEPTION_POINTERS* info) {
// before doing so!
extern "C" void __declspec(dllexport) __cdecl SetCrashKeyValueImpl(
const wchar_t* key, const wchar_t* value) {
+ if (!g_dynamic_entries)
+ return;
+
// CustomInfoEntry limits the length of key and value. If they exceed
// their maximum length the underlying string handling functions raise
// an exception and prematurely trigger a crash. Truncate here.
@@ -448,6 +451,9 @@ extern "C" void __declspec(dllexport) __cdecl SetCrashKeyValueImpl(
extern "C" void __declspec(dllexport) __cdecl ClearCrashKeyValueImpl(
const wchar_t* key) {
+ if (!g_dynamic_entries)
+ return;
+
std::wstring key_string(key);
DynamicEntriesMap::iterator it = g_dynamic_entries->find(key_string);
if (it == g_dynamic_entries->end())