aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar mtklein <mtklein@chromium.org>2015-12-09 10:02:14 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-09 10:02:14 -0800
commit02046c50b294ae2b28e562b0e6e281e4ef823352 (patch)
treea540f843b8c2f50e1876fb3236090bb2ff2e34b9 /src
parentf9e658b1d648948ebe37db5cceebd61cddc94575 (diff)
fix a couple flaky nonnull attribute ubsan warnings
Diffstat (limited to 'src')
-rw-r--r--src/core/SkRecordDraw.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp
index 4847273f52..b9bf92c0ba 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));
}