VirtualBox

Ignore:
Timestamp:
Jul 28, 2009 3:55:07 PM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
50488
Message:

crOpenGL: ignore gldrawpixels with incorrect type/format

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_pixels.c

    r21853 r21854  
    1818{
    1919    unsigned char *data_ptr;
    20     int packet_length;
     20    int packet_length, imagesize;
    2121
    2222    if (pixels == NULL)
     
    4040        sizeof( type );
    4141
    42     packet_length += crImageSize( format, type, width, height );
     42    imagesize = crImageSize( format, type, width, height );
     43
     44    if (imagesize<=0)
     45    {
     46        crDebug("crPackDrawPixels: 0 image size, ignoring");
     47        return;
     48    }
     49
     50    packet_length += imagesize;
    4351
    4452    data_ptr = (unsigned char *) crPackAlloc( packet_length );
Note: See TracChangeset for help on using the changeset viewer.

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