Changeset 71903 in vbox for trunk/src/VBox/GuestHost/OpenGL
- Timestamp:
- Apr 18, 2018 4:22:34 PM (7 years ago)
- Location:
- trunk/src/VBox/GuestHost/OpenGL/state_tracker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_client.c
r69392 r71903 2401 2401 CRASSERT(array && index>=0 && index<CRSTATECLIENT_MAX_VERTEXARRAYS); 2402 2402 2403 if (index<7) 2403 if (array == NULL || index < 0 || index >= CRSTATECLIENT_MAX_VERTEXARRAYS) 2404 { 2405 return NULL; 2406 } 2407 2408 if (index < 7) 2404 2409 { 2405 2410 switch (index) -
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_program.c
r69392 r71903 692 692 693 693 if (target == GL_VERTEX_PROGRAM_NV) { 694 if (index >= UINT32_MAX - num) { 695 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, 696 "glProgramParameters4dvNV(index+num) integer overflow"); 697 return; 698 } 699 694 700 if (index + num < g->limits.maxVertexProgramEnvParams) { 695 701 GLuint i; … … 732 738 733 739 if (target == GL_VERTEX_PROGRAM_NV) { 740 if (index >= UINT32_MAX - num) { 741 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, 742 "glProgramParameters4dvNV(index+num) integer overflow"); 743 return; 744 } 745 734 746 if (index + num < g->limits.maxVertexProgramEnvParams) { 735 747 GLuint i; … … 850 862 return; 851 863 } 852 864 853 865 if (target == GL_VERTEX_PROGRAM_NV) { 854 if (address & 0x3) { 855 /* addr must be multiple of four */ 856 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, 866 if (address & 0x3 || address >= g->limits.maxVertexProgramEnvParams) { 867 crStateError(__LINE__, __FILE__, GL_INVALID_VALUE, 857 868 "glTrackMatrixNV(address)"); 858 return;869 return; 859 870 } 860 871
Note:
See TracChangeset
for help on using the changeset viewer.