Closed
Bug 911850
Opened 9 years ago
Closed 9 years ago
BindBufferRange should check for out-of-bounds range
Categories
(Core :: Graphics: CanvasWebGL, defect)
Core
Graphics: CanvasWebGL
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: bjacob, Assigned: bjacob)
Details
Attachments
(1 file)
1.15 KB,
patch
|
jgilbert
:
review+
|
Details | Diff | Splinter Review |
... rather than trusting the underlying GL to get it right.
Attachment #798634 -
Flags: review?(jgilbert)
Comment 1•9 years ago
|
||
Oups... good catch! =D
Comment 2•9 years ago
|
||
Comment on attachment 798634 [details] [diff] [review] Let BindBufferRange check the range Review of attachment 798634 [details] [diff] [review]: ----------------------------------------------------------------- Nit. ::: content/canvas/src/WebGLContextBuffers.cpp @@ +113,5 @@ > } else if (target != buffer->Target()) { > return ErrorInvalidOperation("bindBuffer: buffer already bound to a different target"); > } > + CheckedInt<WebGLsizeiptr> checked_neededByteLength = CheckedInt<WebGLsizeiptr>(offset) + size; > + if (!checked_neededByteLength.isValid() || checked_neededByteLength.value() > buffer->ByteLength()) { Can we put these two conditions on separate lines?
Attachment #798634 -
Flags: review?(jgilbert) → review+
Assignee | ||
Comment 3•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/49daf6b00b8f
Assignee: nobody → bjacob
Target Milestone: --- → mozilla26
https://hg.mozilla.org/mozilla-central/rev/49daf6b00b8f
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•