Changeset 73223 in vbox
- Timestamp:
- Jul 18, 2018 8:07:50 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
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/GuestHost/OpenGL/include/cr_unpack.h
r71469 r73223 70 70 71 71 #define DATA_POINTER_CHECK( offset ) \ 72 ( ( cr_unpackDataEnd ? cr_unpackData + (offset) < cr_unpackDataEnd : true) )72 ( (offset) >= 0 && (cr_unpackDataEnd >= cr_unpackData) && (size_t)(cr_unpackDataEnd - cr_unpackData) > (size_t)(offset) ) 73 73 74 74 #define INCR_DATA_PTR( delta ) \ -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_teximage.c
r69392 r73223 740 740 CRStateBits *sb = GetCurrentBits(); 741 741 CRTextureBits *tb = &(sb->texture); 742 const int is_distrib = ((type == GL_TRUE) || (type == GL_FALSE)); 742 // Distributed textures are not used by VBox 743 const int is_distrib = 0; // ((type == GL_TRUE) || (type == GL_FALSE)); 743 744 744 745 FLUSH(); -
trunk/src/VBox/GuestHost/OpenGL/util/vboxhgcm.c
r69989 r73223 1079 1079 1080 1080 #ifndef IN_GUEST 1081 /* Expect only CR_MESSAGE_OPCODES from the guest. */ 1082 AssertPtrReturnVoid(conn->pBuffer); 1083 1084 if ( conn->cbBuffer >= sizeof(CRMessageHeader) 1085 && ((CRMessageHeader*) (conn->pBuffer))->type == CR_MESSAGE_OPCODES) 1086 { 1087 /* Looks good. */ 1088 } 1089 else 1090 { 1091 AssertFailed(); 1092 /** @todo Find out if this is the expected cleanup. */ 1093 conn->cbBuffer = 0; 1094 conn->pBuffer = NULL; 1095 return; 1096 } 1097 #endif 1098 1099 #ifndef IN_GUEST 1081 1100 if (conn->allow_redir_ptr) 1082 1101 { -
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 { -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_drawpixels.c
r69390 r73223 8 8 #include "cr_error.h" 9 9 10 #include "state/cr_bufferobject.h" 11 10 12 void crUnpackDrawPixels( void ) 11 13 { … … 16 18 GLint noimagedata = READ_DATA( sizeof( int ) + 16, GLint ); 17 19 GLvoid *pixels; 20 21 if (noimagedata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB)) 22 return; 18 23 19 24 if (noimagedata) … … 42 47 GLuint noimagedata = READ_DATA( sizeof( int ) + 24, GLuint ); 43 48 GLubyte *bitmap; 49 50 if (noimagedata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB)) 51 return; 44 52 45 53 if (noimagedata) -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_pixelmap.c
r69390 r73223 6 6 7 7 #include "unpacker.h" 8 #include "state/cr_bufferobject.h" 8 9 9 10 void crUnpackPixelMapfv( void ) … … 13 14 int nodata = READ_DATA( sizeof(int) + 8, int); 14 15 GLfloat *values; 16 17 if (nodata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB)) 18 return; 15 19 16 20 if (nodata) … … 30 34 GLuint *values; 31 35 36 if (nodata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB)) 37 return; 38 32 39 if (nodata) 33 40 values = (GLuint*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint); … … 46 53 GLushort *values; 47 54 55 if (nodata && !crStateIsBufferBound(GL_PIXEL_UNPACK_BUFFER_ARB)) 56 return; 57 48 58 if (nodata) 49 59 values = (GLushort*) (uintptr_t) READ_DATA(sizeof(int) + 12, GLint); -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_program.c
r71903 r73223 92 92 void crUnpackExtendAreProgramsResidentNV(void) 93 93 { 94 GLsizei n = READ_DATA(8, GLsizei); 95 const GLuint *programs = DATA_POINTER(12, const GLuint); 96 SET_RETURN_PTR(12 + n * sizeof(GLuint)); 97 SET_WRITEBACK_PTR(20 + n * sizeof(GLuint)); 98 (void) cr_unpackDispatch.AreProgramsResidentNV(n, programs, NULL); 94 GLsizei n = READ_DATA(8, GLsizei); 95 const GLuint *programs = DATA_POINTER(12, const GLuint); 96 97 if (n > UINT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(20 + n * sizeof(GLuint))) 98 { 99 crError("crUnpackExtendAreProgramsResidentNV: %d is out of range", n); 100 return; 101 } 102 103 SET_RETURN_PTR(12 + n * sizeof(GLuint)); 104 SET_WRITEBACK_PTR(20 + n * sizeof(GLuint)); 105 (void) cr_unpackDispatch.AreProgramsResidentNV(n, programs, NULL); 99 106 } 100 107 … … 215 222 void crUnpackExtendGetProgramNamedParameterdvNV(void) 216 223 { 217 GLuint id = READ_DATA(8, GLuint); 218 GLsizei len = READ_DATA(12, GLsizei); 219 const GLubyte *name = DATA_POINTER(16, GLubyte); 220 SET_RETURN_PTR(16+len); 221 SET_WRITEBACK_PTR(16+len+8); 222 cr_unpackDispatch.GetProgramNamedParameterdvNV(id, len, name, NULL); 224 GLuint id = READ_DATA(8, GLuint); 225 GLsizei len = READ_DATA(12, GLsizei); 226 const GLubyte *name = DATA_POINTER(16, GLubyte); 227 228 if (len > UINT32_MAX / 4 || !DATA_POINTER_CHECK(16 + len + 8)) 229 { 230 crError("crUnpackExtendGetProgramNamedParameterdvNV: len %d is out of range", len); 231 return; 232 } 233 234 SET_RETURN_PTR(16+len); 235 SET_WRITEBACK_PTR(16+len+8); 236 cr_unpackDispatch.GetProgramNamedParameterdvNV(id, len, name, NULL); 223 237 } 224 238 225 239 void crUnpackExtendGetProgramNamedParameterfvNV(void) 226 240 { 227 GLuint id = READ_DATA(8, GLuint); 228 GLsizei len = READ_DATA(12, GLsizei); 229 const GLubyte *name = DATA_POINTER(16, GLubyte); 230 SET_RETURN_PTR(16+len); 231 SET_WRITEBACK_PTR(16+len+8); 232 cr_unpackDispatch.GetProgramNamedParameterfvNV(id, len, name, NULL); 241 GLuint id = READ_DATA(8, GLuint); 242 GLsizei len = READ_DATA(12, GLsizei); 243 const GLubyte *name = DATA_POINTER(16, GLubyte); 244 245 if (len > UINT32_MAX / 4 || !DATA_POINTER_CHECK(16 + len + 8)) 246 { 247 crError("crUnpackExtendGetProgramNamedParameterfvNV: len %d is out of range", len); 248 return; 249 } 250 251 SET_RETURN_PTR(16+len); 252 SET_WRITEBACK_PTR(16+len+8); 253 cr_unpackDispatch.GetProgramNamedParameterfvNV(id, len, name, NULL); 233 254 } 234 255 -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_texture.c
r70601 r73223 327 327 GLsizei n = READ_DATA( 8, GLsizei ); 328 328 const GLuint *textures = DATA_POINTER( 12, const GLuint ); 329 330 if (n > UINT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(20 + n * sizeof(GLuint))) 331 { 332 crError("crUnpackExtendAreTexturesResident: %d is out of range", n); 333 return; 334 } 335 329 336 SET_RETURN_PTR(12 + n * sizeof(GLuint)); 330 337 SET_WRITEBACK_PTR(20 + n * sizeof(GLuint));
Note:
See TracChangeset
for help on using the changeset viewer.