Changeset 73223 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo
-
old new 8 8 /branches/VBox-5.0:104445,104938,104943,104950,104952-104953,104987-104988,104990,106453 9 9 /branches/VBox-5.1:112367,115992,116543,116550,116568,116573 10 /branches/VBox-5.2:120083,120099,120213,120221,120239 10 /branches/VBox-5.2:120083,120099,120213,120221,120239,123597-123598,123600-123601,123755 11 11 /branches/andy/draganddrop:90781-91268 12 12 /branches/andy/guestctrl20:78916,78930
-
- Property svn:mergeinfo
-
trunk/src/VBox
- Property svn:mergeinfo
-
old new 8 8 /branches/VBox-5.0/src/VBox:104938,104943,104950,104987-104988,104990,106453 9 9 /branches/VBox-5.1/src/VBox:112367,116543,116550,116568,116573 10 /branches/VBox-5.2/src/VBox:120083,120099,120213,120221,120239 10 /branches/VBox-5.2/src/VBox:120083,120099,120213,120221,120239,123597-123598,123600-123601,123755 11 11 /branches/andy/draganddrop/src/VBox:90781-91268 12 12 /branches/andy/guestctrl20/src/VBox:78916,78930
-
- Property svn:mergeinfo
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
r69500 r73223 37 37 void SERVER_DISPATCH_APIENTRY crServerDispatchGetActiveAttrib(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, char *name) 38 38 { 39 crGetActive_t *pLocal; 40 41 pLocal = (crGetActive_t*) crAlloc(bufSize+sizeof(crGetActive_t)); 39 crGetActive_t *pLocal = NULL; 40 41 if (bufSize < INT32_MAX / 2) 42 pLocal = (crGetActive_t*)crAlloc(bufSize + sizeof(crGetActive_t)); 43 42 44 if (!pLocal) 43 45 { … … 56 58 void SERVER_DISPATCH_APIENTRY crServerDispatchGetActiveUniform(GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, char *name) 57 59 { 58 crGetActive_t *pLocal; 59 60 pLocal = (crGetActive_t*) crAlloc(bufSize+sizeof(crGetActive_t)); 60 crGetActive_t *pLocal = NULL; 61 62 if (bufSize < INT32_MAX / 2) 63 pLocal = (crGetActive_t*) crAlloc(bufSize + sizeof(crGetActive_t)); 64 61 65 if (!pLocal) 62 66 { … … 75 79 void SERVER_DISPATCH_APIENTRY crServerDispatchGetAttachedShaders(GLuint program, GLsizei maxCount, GLsizei *count, GLuint *shaders) 76 80 { 77 GLsizei *pLocal; 78 79 pLocal = (GLsizei*) crAlloc(maxCount*sizeof(GLuint)+sizeof(GLsizei)); 81 GLsizei *pLocal = NULL; 82 83 if (maxCount < INT32_MAX / sizeof(GLuint) / 2) 84 pLocal = (GLsizei*) crAlloc(maxCount * sizeof(GLuint) + sizeof(GLsizei)); 85 80 86 if (!pLocal) 81 87 { … … 102 108 void SERVER_DISPATCH_APIENTRY crServerDispatchGetAttachedObjectsARB(VBoxGLhandleARB containerObj, GLsizei maxCount, GLsizei * count, VBoxGLhandleARB * obj) 103 109 { 104 GLsizei *pLocal; 105 106 pLocal = (GLsizei*) crAlloc(maxCount*sizeof(VBoxGLhandleARB)+sizeof(GLsizei)); 110 GLsizei *pLocal = NULL; 111 112 if (maxCount < INT32_MAX / sizeof(VBoxGLhandleARB) / 2) 113 pLocal = (GLsizei*) crAlloc(maxCount * sizeof(VBoxGLhandleARB) + sizeof(GLsizei)); 114 107 115 if (!pLocal) 108 116 { … … 131 139 void SERVER_DISPATCH_APIENTRY crServerDispatchGetInfoLogARB(VBoxGLhandleARB obj, GLsizei maxLength, GLsizei * length, GLcharARB * infoLog) 132 140 { 133 GLsizei *pLocal ;141 GLsizei *pLocal = NULL; 134 142 GLuint hwid; 135 143 136 pLocal = (GLsizei*) crAlloc(maxLength+sizeof(GLsizei)); 144 if (maxLength < INT32_MAX / 2) 145 pLocal = (GLsizei*) crAlloc(maxLength + sizeof(GLsizei)); 146 137 147 if (!pLocal) 138 148 { … … 154 164 void SERVER_DISPATCH_APIENTRY crServerDispatchGetShaderInfoLog(GLuint shader, GLsizei bufSize, GLsizei *length, char *infoLog) 155 165 { 156 GLsizei *pLocal; 157 158 pLocal = (GLsizei*) crAlloc(bufSize+sizeof(GLsizei)); 166 GLsizei *pLocal = NULL; 167 168 if (bufSize < INT32_MAX / 2) 169 pLocal = (GLsizei*) crAlloc(bufSize + sizeof(GLsizei)); 170 159 171 if (!pLocal) 160 172 { … … 172 184 void SERVER_DISPATCH_APIENTRY crServerDispatchGetProgramInfoLog(GLuint program, GLsizei bufSize, GLsizei *length, char *infoLog) 173 185 { 174 GLsizei *pLocal; 175 176 pLocal = (GLsizei*) crAlloc(bufSize+sizeof(GLsizei)); 186 GLsizei *pLocal = NULL; 187 188 if (bufSize < INT32_MAX / 2) 189 pLocal = (GLsizei*) crAlloc(bufSize + sizeof(GLsizei)); 190 177 191 if (!pLocal) 178 192 { … … 191 205 void SERVER_DISPATCH_APIENTRY crServerDispatchGetShaderSource(GLuint shader, GLsizei bufSize, GLsizei *length, char *source) 192 206 { 193 GLsizei *pLocal; 194 195 pLocal = (GLsizei*) crAlloc(bufSize+sizeof(GLsizei)); 207 GLsizei *pLocal = NULL; 208 209 if (bufSize < INT32_MAX / 2) 210 pLocal = (GLsizei*) crAlloc(bufSize + sizeof(GLsizei)); 211 196 212 if (!pLocal) 197 213 { … … 211 227 crServerDispatchGetUniformsLocations(GLuint program, GLsizei maxcbData, GLsizei * cbData, GLvoid * pData) 212 228 { 213 GLsizei *pLocal ;229 GLsizei *pLocal = NULL; 214 230 215 231 (void) cbData; 216 232 (void) pData; 217 233 218 pLocal = (GLsizei*) crAlloc(maxcbData+sizeof(GLsizei)); 234 if (maxcbData < INT32_MAX / 2) 235 pLocal = (GLsizei*) crAlloc(maxcbData + sizeof(GLsizei)); 236 219 237 if (!pLocal) 220 238 { … … 235 253 crServerDispatchGetAttribsLocations(GLuint program, GLsizei maxcbData, GLsizei * cbData, GLvoid * pData) 236 254 { 237 GLsizei *pLocal ;255 GLsizei *pLocal = NULL; 238 256 239 257 (void) cbData; 240 258 (void) pData; 241 259 242 pLocal = (GLsizei*) crAlloc(maxcbData+sizeof(GLsizei)); 260 if (maxcbData < INT32_MAX / 2) 261 pLocal = (GLsizei*) crAlloc(maxcbData + sizeof(GLsizei)); 262 243 263 if (!pLocal) 244 264 {
Note:
See TracChangeset
for help on using the changeset viewer.