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

Unified Diff: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp

Issue 1142713005: Remove FX_Alloc() null checks now that it can't return NULL. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Fix missing FX_Alloc2D, check overflow on add, remove unused enum. Created 5 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 | « core/include/fxge/fx_ge.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
diff --git a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
index 0886d3ff5320683e73afe883fedfe76e4277973e..3abbcee0469254dd0a9950884e8112a5e06ca1c6 100644
--- a/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
+++ b/core/src/fpdfapi/fpdf_edit/fpdf_edit_create.cpp
@@ -415,9 +415,6 @@ FX_BOOL CPDF_Encryptor::Initialize(CPDF_CryptoHandler* pHandler, int objnum, FX_
}
m_dwSize = pHandler->EncryptGetSize(objnum, 0, src_data, src_size);
m_pData = FX_Alloc(FX_BYTE, m_dwSize);
- if(!m_pData) {
- return FALSE;
- }
pHandler->EncryptContent(objnum, 0, src_data, src_size, m_pData, m_dwSize);
m_bNewBuf = TRUE;
return TRUE;
« no previous file with comments | « core/include/fxge/fx_ge.h ('k') | core/src/fpdfapi/fpdf_edit/fpdf_edit_image.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698