Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1039)

Unified Diff: core/fxcrt/fx_basic_maps.cpp

Issue 1991123002: Fix a potential nullptr deref in CFX_MapPtrToPtr. (Closed) Base URL: https://pdfium.googlesource.com/pdfium@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« core/fxcrt/fx_basic_list.cpp ('K') | « core/fxcrt/fx_basic_list.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/fx_basic_maps.cpp
diff --git a/core/fxcrt/fx_basic_maps.cpp b/core/fxcrt/fx_basic_maps.cpp
index 660306b11af30dc26ce074efe36dc3583fbc4ea8..8532d2169ef6328d562dad5d1587af112fefc79e 100644
--- a/core/fxcrt/fx_basic_maps.cpp
+++ b/core/fxcrt/fx_basic_maps.cpp
@@ -21,7 +21,8 @@ void CFX_MapPtrToPtr::RemoveAll() {
m_pHashTable = NULL;
m_nCount = 0;
m_pFreeList = NULL;
- m_pBlocks->FreeDataChain();
+ if (m_pBlocks)
Tom Sepez 2016/05/19 17:02:01 ditto: conditionalize NULL assign, nullptrs.
Lei Zhang 2016/05/19 20:48:50 Done.
+ m_pBlocks->FreeDataChain();
m_pBlocks = NULL;
}
CFX_MapPtrToPtr::~CFX_MapPtrToPtr() {
« core/fxcrt/fx_basic_list.cpp ('K') | « core/fxcrt/fx_basic_list.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698