Bug 299592

Summary: [Skia] Fix unsafe buffer usage warnings in SkiaReplayCanvas.cpp
Product: WebKit Reporter: Adrian Perez <aperez>
Component: PlatformAssignee: Adrian Perez <aperez>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: fujii
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Adrian Perez
Reported 2025-09-26 02:08:30 PDT
/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
Adrian Perez
Comment 1 2025-09-26 02:16:04 PDT
Fujii Hironori
Comment 2 2025-09-26 17:54:47 PDT
*** This bug has been marked as a duplicate of bug 299593 ***
Note You need to log in before you can comment on or make changes to this bug.