Changeset 78105 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Timestamp:
- Apr 10, 2019 8:01:12 PM (6 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c
r69390 r78105 26 26 GLsizei n = READ_DATA( 8, GLsizei ); 27 27 const GLuint *ids = DATA_POINTER(12, GLuint); 28 29 if (n <= 0 || n >= INT32_MAX / sizeof(GLint) / 4 || !DATA_POINTER_CHECK(12 + n * sizeof(GLuint))) 30 { 31 crError("crUnpackExtendDeleteQueriesARB: parameter 'n' is out of range"); 32 return; 33 } 34 28 35 cr_unpackDispatch.DeleteQueriesARB(n, ids); 29 36 } … … 84 91 GLint cRects = READ_DATA( 24, GLint ); 85 92 GLint *pRects = (GLint *)DATA_POINTER( 28, GLvoid ); 93 94 if (cRects <= 0 || cRects >= INT32_MAX / sizeof(GLint) / 8 || !DATA_POINTER_CHECK(28 + 4 * cRects * sizeof(GLint))) 95 { 96 crError("crUnpackExtendVBoxTexPresent: parameter 'cRects' is out of range"); 97 return; 98 } 99 86 100 cr_unpackDispatch.VBoxTexPresent( texture, cfg, xPos, yPos, cRects, pRects ); 87 101 } -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c
r76787 r78105 43 43 int pos, pos_check; 44 44 45 if (count <= 0 || count >= INT32_MAX / sizeof( char *) / 4)45 if (count <= 0 || count >= INT32_MAX / sizeof(GLint) / 8) 46 46 { 47 47 crError("crUnpackExtendShaderSource: count %u is out of range", count); … … 50 50 51 51 pos = 20 + count * sizeof(*pLocalLength); 52 53 if (!DATA_POINTER_CHECK(pos)) 54 { 55 crError("crUnpackExtendShaderSource: pos %d is out of range", pos); 56 return; 57 } 52 58 53 59 if (hasNonLocalLen > 0) … … 57 63 } 58 64 65 if (!DATA_POINTER_CHECK(pos)) 66 { 67 crError("crUnpackExtendShaderSource: pos %d is out of range", pos); 68 return; 69 } 70 59 71 pos_check = pos; 60 72 61 if (!DATA_POINTER_CHECK(pos_check))62 {63 crError("crUnpackExtendShaderSource: pos %d is out of range", pos_check);64 return;65 }66 67 73 for (i = 0; i < count; ++i) 68 74 { 69 if (pLocalLength[i] <= 0 || pos_check >= INT32_MAX - pLocalLength[i] || !DATA_POINTER_CHECK(pos_check))75 if (pLocalLength[i] <= 0 || pos_check >= INT32_MAX - pLocalLength[i]) 70 76 { 71 77 crError("crUnpackExtendShaderSource: pos %d is out of range", pos_check); … … 74 80 75 81 pos_check += pLocalLength[i]; 82 83 if (!DATA_POINTER_CHECK(pos_check)) 84 { 85 crError("crUnpackExtendShaderSource: pos %d is out of range", pos_check); 86 return; 87 } 76 88 } 77 89
Note:
See TracChangeset
for help on using the changeset viewer.