VirtualBox

Changeset 28198 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Apr 12, 2010 12:02:48 PM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: fix possible read of unallocated memory

File:
1 edited

Legend:

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

    r28197 r28198  
    275275    char *pixels, *tmppixels, *pSrc, *pDst;
    276276    GLuint uid;
    277     int i, j, rowsize, rowstride, height;
     277    int i, j, realrowsize, rowsize, rowstride, height;
    278278    CRrecti rect;
    279279    CRContext *ctx = crStateGetCurrent();
     
    298298        {
    299299            rowsize = 4*RT_ALIGN_Z(rect.x2-rect.x1, 4);
     300            realrowsize = 4*(rect.x2-rect.x1);
    300301            tmppixels = crAlloc(rowsize*(rect.y2-rect.y1));
     302           
    301303            if (!tmppixels)
    302304            {
     
    313315            for (j=0; j<height; ++j)
    314316            {
    315                 crMemcpy(pDst, pSrc, rowsize);
     317                crMemcpy(pDst, pSrc, realrowsize);
    316318
    317319                pSrc -= rowstride;
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