commit | 02046c50b294ae2b28e562b0e6e281e4ef823352 | [log] [tgz] |
---|---|---|
author | mtklein <mtklein@chromium.org> | Wed Dec 09 10:02:14 2015 -0800 |
committer | Commit bot <commit-bot@chromium.org> | Wed Dec 09 10:02:14 2015 -0800 |
tree | a540f843b8c2f50e1876fb3236090bb2ff2e34b9 | |
parent | f9e658b1d648948ebe37db5cceebd61cddc94575 [diff] [blame] |
fix a couple flaky nonnull attribute ubsan warnings Errors this should fix: https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/3779/steps/dm/logs/stdio https://uberchromegw.corp.google.com/i/client.skia/builders/Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN/builds/3779/steps/nanobench/logs/stdio CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Debug-ASAN-Trybot TBR=reed@google.com No API changes. BUG=skia: Review URL: https://codereview.chromium.org/1504313005
diff --git a/src/core/SkRecordDraw.cpp b/src/core/SkRecordDraw.cpp index 4847273..b9bf92c 100644 --- a/src/core/SkRecordDraw.cpp +++ b/src/core/SkRecordDraw.cpp
@@ -693,7 +693,8 @@ // 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)); }