- Timestamp:
- Mar 15, 2012 2:16:50 PM (13 years ago)
- Location:
- trunk/src/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/crOpenGL/pack/packspu_getshaders.c
r37157 r40479 22 22 #include "packspu_proto.h" 23 23 #include "cr_mem.h" 24 #include <iprt/assert.h> 24 25 25 26 /*@todo combine with the one from server_getshaders.c*/ … … 123 124 } 124 125 126 AssertCompile(sizeof(GLsizei) == 4); 127 125 128 void PACKSPU_APIENTRY packspu_GetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog) 126 129 { … … 140 143 crNetRecv(); 141 144 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); 144 149 crFree(pLocal); 145 150 } -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
r40167 r40479 25 25 #include "server.h" 26 26 27 #include <iprt/assert.h> 28 27 29 #ifdef CR_OPENGL_VERSION_2_0 28 30 … … 114 116 } 115 117 118 AssertCompile(sizeof(GLsizei) == 4); 119 116 120 void SERVER_DISPATCH_APIENTRY crServerDispatchGetInfoLogARB(GLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog) 117 121 { … … 129 133 if (!hwid) hwid = crStateGetShaderHWID(obj); 130 134 cr_server.head_spu->dispatch_table.GetInfoLogARB(hwid, maxLength, pLocal, (char*)&pLocal[1]); 135 CRASSERT((*pLocal) <= maxLength); 131 136 crServerReturnValue(pLocal, (*pLocal)+sizeof(GLsizei)); 132 137 crFree(pLocal); … … 159 164 } 160 165 cr_server.head_spu->dispatch_table.GetProgramInfoLog(crStateGetProgramHWID(program), bufSize, pLocal, (char*)&pLocal[1]); 166 CRASSERT(pLocal[0] <= bufSize); 161 167 crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei)); 162 168 crFree(pLocal); … … 174 180 } 175 181 cr_server.head_spu->dispatch_table.GetShaderSource(crStateGetShaderHWID(shader), bufSize, pLocal, (char*)&pLocal[1]); 182 CRASSERT(pLocal[0] <= bufSize); 176 183 crServerReturnValue(pLocal, pLocal[0]+sizeof(GLsizei)); 177 184 crFree(pLocal);
Note:
See TracChangeset
for help on using the changeset viewer.