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

Unified Diff: core/src/fxge/agg/agg23/fx_agg_path_storage.cpp

Issue 1136673005: Merge to XFA: Add safe FX_Alloc2D() macro (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: 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/src/fxcrt/fx_basic_memmgr_unittest.cpp ('k') | core/src/fxge/dib/fx_dib_engine.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
diff --git a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp b/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
index 8c4b701ebe349038b3555f271732f87bc3d59cd4..b4b184e0a4abcc859574dff1afc67c1490b26248 100644
--- a/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
+++ b/core/src/fxge/agg/agg23/fx_agg_path_storage.cpp
@@ -51,10 +51,7 @@ void path_storage::allocate_block(unsigned nb)
{
if(nb >= m_max_blocks) {
FX_FLOAT** new_coords =
- FX_Alloc( FX_FLOAT*, (m_max_blocks + block_pool) * 2);
- if (!new_coords) {
- return;
- }
+ FX_Alloc2D(FX_FLOAT*, m_max_blocks + block_pool, 2);
unsigned char** new_cmds =
(unsigned char**)(new_coords + m_max_blocks + block_pool);
if(m_coord_blocks) {
« no previous file with comments | « core/src/fxcrt/fx_basic_memmgr_unittest.cpp ('k') | core/src/fxge/dib/fx_dib_engine.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698