Index: src/core/SkRecordDraw.cpp |
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp |
index 4847273f52a826f4eb2510abb75b4e7860cc82d2..b9bf92c0bad77b9a73ff7711d7e24b905e822491 100644 |
--- a/src/core/SkRecordDraw.cpp |
+++ b/src/core/SkRecordDraw.cpp |
@@ -693,7 +693,8 @@ private: |
// Store 'saveLayer ops from enclosing picture' + drawPict op + 'ops from sub-picture' |
dst.fKeySize = fSaveLayerOpStack.count() + src.fKeySize + 1; |
dst.fKey = new int[dst.fKeySize]; |
- memcpy(dst.fKey, fSaveLayerOpStack.begin(), fSaveLayerOpStack.count() * sizeof(int)); |
+ sk_careful_memcpy(dst.fKey, fSaveLayerOpStack.begin(), |
+ fSaveLayerOpStack.count() * sizeof(int)); |
dst.fKey[fSaveLayerOpStack.count()] = fFillBounds.currentOp(); |
memcpy(&dst.fKey[fSaveLayerOpStack.count()+1], src.fKey, src.fKeySize * sizeof(int)); |
} |