VirtualBox

Changeset 71903 in vbox for trunk/src/VBox/GuestHost/OpenGL


Ignore:
Timestamp:
Apr 18, 2018 4:22:34 PM (7 years ago)
Author:
vboxsync
Message:

3D: bugref:9096, Chromium code cleanup

Location:
trunk/src/VBox/GuestHost/OpenGL/state_tracker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c

    r69392 r71903  
    24012401    CRASSERT(array && index>=0 && index<CRSTATECLIENT_MAX_VERTEXARRAYS);
    24022402
    2403     if (index<7)
     2403    if (array == NULL || index < 0 || index >= CRSTATECLIENT_MAX_VERTEXARRAYS)
     2404    {
     2405        return NULL;
     2406    }
     2407
     2408    if (index < 7)
    24042409    {
    24052410        switch (index)
  • trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c

    r69392 r71903  
    692692
    693693    if (target == GL_VERTEX_PROGRAM_NV) {
     694        if (index >= UINT32_MAX - num) {
     695            crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
     696                "glProgramParameters4dvNV(index+num) integer overflow");
     697            return;
     698        }
     699
    694700        if (index + num < g->limits.maxVertexProgramEnvParams) {
    695701            GLuint i;
     
    732738
    733739    if (target == GL_VERTEX_PROGRAM_NV) {
     740        if (index >= UINT32_MAX - num) {
     741            crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
     742                "glProgramParameters4dvNV(index+num) integer overflow");
     743            return;
     744        }
     745
    734746        if (index + num < g->limits.maxVertexProgramEnvParams) {
    735747            GLuint i;
     
    850862        return;
    851863    }
    852    
     864
    853865    if (target == GL_VERTEX_PROGRAM_NV) {
    854         if (address & 0x3) {
    855       /* addr must be multiple of four */
    856       crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
     866        if (address & 0x3 || address >= g->limits.maxVertexProgramEnvParams) {
     867            crStateError(__LINE__, __FILE__, GL_INVALID_VALUE,
    857868                                     "glTrackMatrixNV(address)");
    858       return;
     869            return;
    859870        }
    860871
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette