Changeset 78105 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Timestamp:
- Apr 10, 2019 8:01:12 PM (6 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/presenter/server_presenter.cpp
r76553 r78105 146 146 static int8_t crFbImgFromDimOffVramBGRA(VBOXCMDVBVAOFFSET offVRAM, uint32_t width, uint32_t height, CR_BLITTER_IMG *pImg) 147 147 { 148 uint32_t cbBuff = width * height * 4; 148 uint32_t cbBuff; 149 150 if (width == 0 || height == 0) 151 { 152 WARN(("invalid param")); 153 return -1; 154 } 155 156 cbBuff = width * height * 4; 157 // Check if overflow happened 158 if (cbBuff / width != height * 4) 159 { 160 WARN(("invalid param")); 161 return -1; 162 } 163 149 164 if (offVRAM >= g_cbVRam 165 || UINT32_MAX - cbBuff <= offVRAM 150 166 || offVRAM + cbBuff >= g_cbVRam) 151 167 { -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_get.py
r78078 r78105 49 49 'GetProgramParameterfvNV': 4, 50 50 'GetProgramivNV': 1, 51 'GetTrackMatrixivNV': 1,51 'GetTrackMatrixivNV': 24, 52 52 'GetVertexAttribPointervNV': 1, 53 53 'GetVertexAttribdvNV': 4, … … 127 127 local_argname = 'local_%s' % lastParam[0] 128 128 129 print('\tunsigned int cComponents = 0;'); 129 if not func_name in no_pnames: 130 print('\tunsigned int cComponents = 0;'); 130 131 print('\t%s %s[%d] = { 0 };' % ( local_argtype, local_argname, max_components[func_name] )) 131 132 print('\t(void) %s;' % lastParam[0]) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getpixelmap.c
r69390 r78105 80 80 81 81 size *= tabsize; 82 local_values = (GLfloat*)cr Alloc( size );82 local_values = (GLfloat*)crCalloc( size ); 83 83 84 84 cr_server.head_spu->dispatch_table.GetPixelMapfv( map, local_values ); … … 107 107 108 108 size *= tabsize; 109 local_values = (GLuint*)cr Alloc( size );109 local_values = (GLuint*)crCalloc( size ); 110 110 111 111 cr_server.head_spu->dispatch_table.GetPixelMapuiv( map, local_values ); … … 134 134 135 135 size *= tabsize; 136 local_values = (GLushort*)cr Alloc( size );136 local_values = (GLushort*)crCalloc( size ); 137 137 138 138 cr_server.head_spu->dispatch_table.GetPixelMapusv( map, local_values ); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_getshaders.c
r76787 r78105 359 359 void SERVER_DISPATCH_APIENTRY crServerDispatchGetObjectParameterfvARB( VBoxGLhandleARB obj, GLenum pname, GLfloat * params ) 360 360 { 361 GLfloat local_params[1] ;361 GLfloat local_params[1] = {0}; 362 362 GLuint hwid = crStateGetProgramHWID(obj); 363 363 (void) params; … … 378 378 void SERVER_DISPATCH_APIENTRY crServerDispatchGetObjectParameterivARB( VBoxGLhandleARB obj, GLenum pname, GLint * params ) 379 379 { 380 GLint local_params[1] ;380 GLint local_params[1] = {0}; 381 381 GLuint hwid = crStateGetProgramHWID(obj); 382 382 if (!hwid) -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c
r76787 r78105 151 151 void SERVER_DISPATCH_APIENTRY crServerDispatchGetProgramiv( GLuint program, GLenum pname, GLint * params ) 152 152 { 153 GLint local_params[1] ;153 GLint local_params[1] = {0}; 154 154 (void) params; 155 155 cr_server.head_spu->dispatch_table.GetProgramiv(crStateGetProgramHWID(program), pname, local_params); … … 159 159 void SERVER_DISPATCH_APIENTRY crServerDispatchGetShaderiv( GLuint shader, GLenum pname, GLint * params ) 160 160 { 161 GLint local_params[1] ;161 GLint local_params[1] = {0}; 162 162 (void) params; 163 163 cr_server.head_spu->dispatch_table.GetShaderiv( crStateGetShaderHWID(shader), pname, local_params ); -
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_papi.c
r69390 r78105 32 32 cr_server.head_spu->dispatch_table.ChromiumParametervCR( GL_PRINT_STRING_CR, GL_UNSIGNED_BYTE, sizeof(debug_buf), debug_buf ); 33 33 #endif 34 35 if (count > CR_MAX_CLIENTS) 36 count = CR_MAX_CLIENTS; 37 34 38 if (count == 0) 35 39 {
Note:
See TracChangeset
for help on using the changeset viewer.