VirtualBox

Changeset 78212 in vbox for trunk/src


Ignore:
Timestamp:
Apr 18, 2019 9:39:13 PM (6 years ago)
Author:
vboxsync
Message:

HostServices/ShareOpenGL/unpacker: Verification fixes

Location:
trunk/src/VBox/HostServices/SharedOpenGL/unpacker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_calllists.cpp

    r78190 r78212  
    99void crUnpackCallLists(PCrUnpackerState pState)
    1010{
    11     CHECK_BUFFER_SIZE_STATIC_LAST(pState, 4, GLenum);
     11    CHECK_BUFFER_SIZE_STATIC_LAST(pState, sizeof( int ) + 4, GLenum);
    1212
    1313    GLint n = READ_DATA(pState, sizeof( int ) + 0, GLint );
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_pixelmap.cpp

    r78190 r78212  
    2323    {
    2424        /* This is valid, see glPixelMap description for GL_PIXEL_UNPACK_BUFFER values is treated as a byte offset. */
     25        CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, sizeof( int ) + 12, GLfloat);
    2526        values = (GLfloat*) (uintptr_t) READ_DATA(pState,sizeof(int) + 12, GLint);
    2627    }
    2728    else
    2829    {
     30        CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, sizeof( int ) + 16, GLfloat);
     31
    2932        values = DATA_POINTER(pState, sizeof( int ) + 16, GLfloat );
    3033        CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, values, mapsize, GLfloat);
     
    5053    {
    5154        /* This is valid, see glPixelMap description for GL_PIXEL_UNPACK_BUFFER values is treated as a byte offset. */
     55        CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, sizeof( int ) + 12, GLfloat);
    5256        values = (GLuint*) (uintptr_t) READ_DATA(pState,sizeof(int) + 12, GLint);
    5357    }
    5458    else
    5559    {
     60        CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, sizeof( int ) + 16, GLfloat);
     61
    5662        values = DATA_POINTER(pState, sizeof( int ) + 16, GLuint );
    5763        CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, values, mapsize, GLuint);
     
    7783    {
    7884        /* This is valid, see glPixelMap description for GL_PIXEL_UNPACK_BUFFER values is treated as a byte offset. */
     85        CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, sizeof( int ) + 12, GLfloat);
    7986        values = (GLushort*) (uintptr_t) READ_DATA(pState, sizeof(int) + 12, GLint);
    8087    }
    8188    else
    8289    {
     90        CHECK_BUFFER_SIZE_STATIC_UPDATE_LAST(pState, sizeof( int ) + 16, GLfloat);
     91
    8392        values = DATA_POINTER(pState, sizeof( int ) + 16, GLushort );
    8493        CHECK_ARRAY_SIZE_FROM_PTR_UPDATE_LAST(pState, values, mapsize, GLushort);
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