VirtualBox

Changeset 40479 in vbox for trunk/src/VBox/Additions/common


Ignore:
Timestamp:
Mar 15, 2012 2:16:50 PM (13 years ago)
Author:
vboxsync
Message:

crOpenGL: build log bugfix

File:
1 edited

Legend:

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

    r37157 r40479  
    2222#include "packspu_proto.h"
    2323#include "cr_mem.h"
     24#include <iprt/assert.h>
    2425
    2526/*@todo combine with the one from server_getshaders.c*/
     
    123124}
    124125
     126AssertCompile(sizeof(GLsizei) == 4);
     127
    125128void PACKSPU_APIENTRY packspu_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog)
    126129{
     
    140143        crNetRecv();
    141144
    142     if (length) *length=*pLocal;
    143     crMemcpy(infoLog, &pLocal[1], (*pLocal)+1);
     145    CRASSERT((pLocal[0]) <= maxLength);
     146
     147    if (length) *length=*pLocal;
     148    crMemcpy(infoLog, &pLocal[1], (maxLength >= (pLocal[0])) ? pLocal[0] : maxLength);
    144149    crFree(pLocal);
    145150}
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