Bug 80778 - Null argument to texSubImage2D crashes
Summary: Null argument to texSubImage2D crashes
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebGL (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P1 Normal
Assignee: Kenneth Russell
Depends on:
Reported: 2012-03-10 21:24 PST by Kenneth Russell
Modified: 2012-03-12 14:59 PDT (History)
6 users (show)

See Also:

Patch (7.51 KB, patch)
2012-03-12 12:00 PDT, Kenneth Russell
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kenneth Russell 2012-03-10 21:24:32 PST
Passing null to the texSubImage2D variant taking ArrayBufferData causes a crash in both Safari and Chromium. At one point the intent of the code was to generate an INVALID_VALUE OpenGL error, but at some point this regressed. It also isn't tested by the WebGL conformance tests. The exact behavior is still being discussed on the public_webgl mailing list but minimally the code should be patched immediately to avoid crashing.
Comment 1 Zhenyao Mo 2012-03-12 10:23:53 PDT
I'll patch it to generate INVALID_ERROR for now.
Comment 2 Kenneth Russell 2012-03-12 12:00:54 PDT
Created attachment 131374 [details]
Comment 3 Kenneth Russell 2012-03-12 12:01:36 PDT
Oops, Mo, sorry, I didn't see you had taken this. Feel free to use or ignore the attached patch.
Comment 4 Zhenyao Mo 2012-03-12 12:50:41 PDT
The patch looks good.  Assigning to kbr.
Comment 5 Dean Jackson 2012-03-12 14:06:59 PDT
Comment on attachment 131374 [details]

Comment 6 WebKit Review Bot 2012-03-12 14:59:33 PDT
Comment on attachment 131374 [details]

Clearing flags on attachment: 131374

Committed r110485: <http://trac.webkit.org/changeset/110485>
Comment 7 WebKit Review Bot 2012-03-12 14:59:38 PDT
All reviewed patches have been landed.  Closing bug.