Commit 2ee4be6
Cherry-pick 252432.896@safari-7614-branch (91df735). rdar://98583503
[WebGL] Harden texImageImpl byte length calculation
rdar://98583503
Reviewed by Kimmo Kinnunen and Ryan Haddad.
The calculation of the image size has been validated earlier but out of an
abundance of caution, use checked arithmetic on size_t to perform calculation,
returning a GL error on overflow.
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::texImageImpl):
Calculate imagePixelsByteLength with checked arithmetic to catch integer
overflow.
Canonical link: https://commits.webkit.org/252432.896@safari-7614-branch1 parent ee69ee9 commit 2ee4be6
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5350 | 5350 | | |
5351 | 5351 | | |
5352 | 5352 | | |
| 5353 | + | |
| 5354 | + | |
| 5355 | + | |
| 5356 | + | |
| 5357 | + | |
| 5358 | + | |
| 5359 | + | |
| 5360 | + | |
5353 | 5361 | | |
5354 | 5362 | | |
5355 | | - | |
5356 | 5363 | | |
5357 | 5364 | | |
5358 | | - | |
5359 | 5365 | | |
5360 | 5366 | | |
5361 | 5367 | | |
| |||
0 commit comments