VirtualBox

Ignore:
Timestamp:
Jan 16, 2018 4:26:58 PM (7 years ago)
Author:
vboxsync
Message:

3D: SharedOpenGL code cleanup, bugref:9043

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c

    r69500 r70601  
    179179void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteProgramsARB(GLsizei n, const GLuint * programs)
    180180{
    181     GLuint *pLocalProgs = (GLuint *) crAlloc(n * sizeof(GLuint));
     181    GLuint *pLocalProgs;
    182182    GLint i;
     183
     184    if (n >= UINT32_MAX / sizeof(GLuint))
     185    {
     186        crError("crServerDispatchDeleteProgramsARB: parameter 'n' is out of range");
     187        return;
     188    }
     189
     190    pLocalProgs = (GLuint *)crAlloc(n * sizeof(GLuint));
     191
    183192    if (!pLocalProgs) {
    184193        crError("crServerDispatchDeleteProgramsARB: out of memory");
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