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

Unified Diff: core/fxcrt/include/fx_basic.h

Issue 1986453002: Fix binding of null pointer dereference to reference type (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Use PDFIUM_ prefix for the macro 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
« no previous file with comments | « no previous file | core/fxcrt/include/fx_system.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/fxcrt/include/fx_basic.h
diff --git a/core/fxcrt/include/fx_basic.h b/core/fxcrt/include/fx_basic.h
index 7121ffcd0bd81cd8cb4d4932fa18dbd1c7ed4e87..59d72b8f5aef8fb4a422ecf61180480652b3d930 100644
--- a/core/fxcrt/include/fx_basic.h
+++ b/core/fxcrt/include/fx_basic.h
@@ -277,7 +277,7 @@ class CFX_ArrayTemplate : public CFX_BasicArray {
const TYPE GetAt(int nIndex) const {
if (nIndex < 0 || nIndex >= m_nSize) {
- return (const TYPE&)(*(volatile const TYPE*)NULL);
+ PDFIUM_IMMEDIATE_CRASH();
}
return ((const TYPE*)m_pData)[nIndex];
}
@@ -292,7 +292,7 @@ class CFX_ArrayTemplate : public CFX_BasicArray {
TYPE& ElementAt(int nIndex) {
if (nIndex < 0 || nIndex >= m_nSize) {
- return *(TYPE*)NULL;
+ PDFIUM_IMMEDIATE_CRASH();
}
return ((TYPE*)m_pData)[nIndex];
}
« no previous file with comments | « no previous file | core/fxcrt/include/fx_system.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698