Bug 299592
| Summary: | [Skia] Fix unsafe buffer usage warnings in SkiaReplayCanvas.cpp | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | Platform | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | fujii |
| Priority: | P2 | ||
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
Adrian Perez
/home/aperez/devel/WebKit-Android/Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.cpp:92:16: warning: 'mode' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]
92 | SkTileMode mode[2];
| ~~~~~~~~~~~^~~~~~~
/home/aperez/devel/WebKit-Android/Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.cpp:98:63: note: used in buffer access here
98 | paintCopy.setShader(wrappedImage->makeShader(mode[0], mode[1], SkSamplingOptions(), &localMatrix));
| ^~~~
/home/aperez/devel/WebKit-Android/Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.cpp:109:16: warning: 'mode' is an unsafe buffer that does not perform bounds checks [-Wunsafe-buffer-usage]
109 | SkTileMode mode[2];
| ~~~~~~~~~~~^~~~~~~
/home/aperez/devel/WebKit-Android/Source/WebCore/platform/graphics/skia/SkiaReplayCanvas.cpp:114:61: note: used in buffer access here
114 | auto shaderCopy = wrappedImage->makeShader(mode[0], mode[1], SkSamplingOptions(), &localMatrix);
| ^~~~
2 warnings generated.
| Attachments | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Adrian Perez
Pull request: https://github.com/WebKit/WebKit/pull/51375
Fujii Hironori
*** This bug has been marked as a duplicate of bug 299593 ***