VirtualBox

Changeset 55622 in vbox


Ignore:
Timestamp:
May 3, 2015 3:28:24 PM (9 years ago)
Author:
vboxsync
Message:

3D: Windows GAs: drop relatively big buffer allocation on stack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/common/crOpenGL/wgl.c

    r51559 r55622  
    88#include "cr_spu.h"
    99#include "cr_environment.h"
     10#include "cr_mem.h"
    1011#include "stub.h"
    1112
     
    354355DECLEXPORT(HGLRC) WINAPI VBoxCreateContext( HDC hdc, struct VBOXUHGSMI *pHgsmi )
    355356{
    356     char dpyName[MAX_DPY_NAME];
     357    char *dpyName;
    357358    ContextInfo *context;
    358359
     
    363364    CRASSERT(stub.contextTable);
    364365
    365     sprintf(dpyName, "%d", hdc);
     366    dpyName = crCalloc(MAX_DPY_NAME);
     367    if (dpyName)
     368    {
     369        crMemset(dpyName, 0, MAX_DPY_NAME);
     370        sprintf(dpyName, "%d", hdc);
     371    }
    366372#ifndef VBOX_CROGL_USE_VBITS_SUPERSET
    367373    if (stub.haveNativeOpenGL)
     
    376382#endif
    377383            );
     384    /* Not needed any more. */
     385    crFree(dpyName);
     386
    378387    if (!context)
    379388        return 0;
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