Code: static void* lookupOpenGLFunctionAddress(const char* functionName, bool* success = 0)
{
    if (success && !*success)
        return 0;

    void* target = getProcAddress(functionName);
    if (target)
        return target;

    String fullFunctionName(functionName);
    fullFunctionName.append("ARB");
    target = getProcAddress(fullFunctionName.utf8().data());
    if (target)
        return target;

    fullFunctionName = functionName;
    fullFunctionName.append("EXT");
    target = getProcAddress(fullFunctionName.utf8().data());

#if defined(GL_ES_VERSION_2_0)
     fullFunctionName = functionName;
     fullFunctionName.append("ANGLE");
     target = getProcAddress(fullFunctionName.utf8().data());
 
     fullFunctionName = functionName;
     fullFunctionName.append("APPLE");
    target = getProcAddress(fullFunctionName.utf8().data());
#endif

    if (!target && success)
        *success = false;

    return target;
}

Vulnerability Type: 
CWE ID: 
Summary: Multiple unspecified vulnerabilities in the PDF functionality in Google Chrome before 22.0.1229.79 allow remote attackers to have an unknown impact via a crafted document.
Commit Message: OpenGLShims: fix check for ANGLE GLES2 extensions
https://bugs.webkit.org/show_bug.cgi?id=111656

Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-03-07
Reviewed by Simon Hausmann.

The check for ANGLE GLES2 extensions is currently being overriden
with checks for APPLE extensions in lookupOpenGLFunctionAddress().

No new tests. No user visible behavior changed.

* platform/graphics/OpenGLShims.cpp:
(WebCore::lookupOpenGLFunctionAddress):

git-svn-id: svn://svn.chromium.org/blink/trunk@145079 bbb929c8-8fbe-4397-9dbb-9b2b20218538