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

Unified Diff: core/src/fxge/skia/fx_skia_device.cpp

Issue 1143663004: Add safe FX_Alloc2D() macro (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Drop one file, indent. 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/fxge/dib/fx_dib_engine.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: core/src/fxge/skia/fx_skia_device.cpp
diff --git a/core/src/fxge/skia/fx_skia_device.cpp b/core/src/fxge/skia/fx_skia_device.cpp
index cc4059dd1d447dce697480c35016a2fcd3da078a..a483eca5ca8f18dfec3cb4d61a60dd432f9190c2 100644
--- a/core/src/fxge/skia/fx_skia_device.cpp
+++ b/core/src/fxge/skia/fx_skia_device.cpp
@@ -210,7 +210,7 @@ static void SkRasterizeStroke(SkPaint& spaint, SkPath* dstPathData, SkPath& path
dstPathData->transform(smatrix);
} else {
int count = (pGraphState->m_DashCount+1)/2;
- SkScalar* intervals = FX_Alloc(SkScalar, count* sizeof (SkScalar));
+ SkScalar* intervals = FX_Alloc2D(SkScalar, count, sizeof(SkScalar));
// Set dash pattern
for (int i = 0; i < count; i ++) {
FX_FIXFLOAT on = pGraphState->m_DashArray[i*2];
« no previous file with comments | « core/src/fxge/dib/fx_dib_engine.cpp ('k') | core/src/fxge/win32/fx_win32_gdipext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698