Bug 82859 - Missing NULL check for vendor string from glGetString()
Summary: Missing NULL check for vendor string from glGetString()
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: 528+ (Nightly build)
Hardware: All Linux
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-02 00:03 PDT by Srikumar B
Modified: 2012-04-02 10:32 PDT (History)
3 users (show)

See Also:


Attachments
proposed patch (2.04 KB, patch)
2012-04-02 09:02 PDT, Srikumar B
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Srikumar B 2012-04-02 00:03:28 PDT
glGetString(GL_VENDOR) is possible to return NULL value but in Webkit we are not validating the return value before we call strstr() to compare the vendor list. Hence webkit crashes when it does not get vendor string response from openGL call glGetString(GL_VENDOR).

Refer to http://www.opengl.org/sdk/docs/man/xhtml/glGetString.xml for glGetString() description.
Comment 1 Srikumar B 2012-04-02 00:27:24 PDT
Please assign it to me. I will be uploading the patch with the changes.
Comment 2 Srikumar B 2012-04-02 09:02:07 PDT
Created attachment 135112 [details]
proposed patch

Proposed patch. Changes to add additional check for vendor string.
Comment 3 Kentaro Hara 2012-04-02 09:42:58 PDT
Comment on attachment 135112 [details]
proposed patch

Looks OK.
Comment 4 WebKit Review Bot 2012-04-02 10:32:33 PDT
Comment on attachment 135112 [details]
proposed patch

Clearing flags on attachment: 135112

Committed r112901: <http://trac.webkit.org/changeset/112901>
Comment 5 WebKit Review Bot 2012-04-02 10:32:37 PDT
All reviewed patches have been landed.  Closing bug.