Changeset 79340 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Timestamp:
- Jun 26, 2019 8:38:38 AM (6 years ago)
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_map.cpp
r78190 r79340 37 37 38 38 cbMax = (ustride * uorder + vstride * vorder) * sizeof(double); 39 if (!DATA_POINTER_CHECK (pState, cbMax))39 if (!DATA_POINTER_CHECK_SIZE(pState, cbMax)) 40 40 { 41 41 crError("crUnpackMap2d: parameters out of range"); … … 74 74 75 75 cbMax = (ustride * uorder + vstride * vorder) * sizeof(float); 76 if (!DATA_POINTER_CHECK (pState, cbMax))76 if (!DATA_POINTER_CHECK_SIZE(pState, cbMax)) 77 77 { 78 78 crError("crUnpackMap2f: parameters out of range"); … … 105 105 106 106 cbMax = stride * order * sizeof(double); 107 if (!DATA_POINTER_CHECK (pState, cbMax))107 if (!DATA_POINTER_CHECK_SIZE(pState, cbMax)) 108 108 { 109 109 crError("crUnpackMap1d: parameters out of range"); … … 136 136 137 137 cbMax = stride * order * sizeof(float); 138 if (!DATA_POINTER_CHECK (pState, cbMax))138 if (!DATA_POINTER_CHECK_SIZE(pState, cbMax)) 139 139 { 140 140 crError("crUnpackMap1f: parameters out of range"); -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.cpp
r78375 r79340 54 54 const GLuint *ids = DATA_POINTER(pState, 12, GLuint); 55 55 56 if (n < 0 || n >= INT32_MAX / sizeof(GLint) / 4 || !DATA_POINTER_CHECK(pState, 12 + n * sizeof(GLuint)))56 if (n < 0 || n >= (INT32_MAX / 8) / sizeof(GLint) || !DATA_POINTER_CHECK_SIZE(pState, 12 + n * sizeof(GLuint))) 57 57 { 58 58 crError("crUnpackExtendDeleteQueriesARB: parameter 'n' is out of range"); … … 136 136 GLint *pRects = (GLint *)DATA_POINTER(pState, 28, GLvoid ); 137 137 138 if (cRects <= 0 || cRects >= INT32_MAX / sizeof(GLint) / 8 || !DATA_POINTER_CHECK(pState, 28 + 4 * cRects* sizeof(GLint)))138 if (cRects <= 0 || cRects >= (INT32_MAX / 8) / (4 * sizeof(GLint)) || !DATA_POINTER_CHECK_SIZE(pState, 28 + cRects * 4 * sizeof(GLint))) 139 139 { 140 crError("crUnpackExtendVBoxTexPresent: parameter 'cRects' is out of range");140 crError("crUnpackExtendVBoxTexPresent: parameter 'cRects' %d is out of range", cRects); 141 141 return; 142 142 } -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_program.cpp
r78263 r79340 92 92 const GLuint *programs = DATA_POINTER(pState, 12, const GLuint); 93 93 94 if (n <= 0 || n >= INT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK (pState, 20 + n * sizeof(GLuint)))94 if (n <= 0 || n >= INT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK_SIZE(pState, 20 + n * sizeof(GLuint))) 95 95 { 96 96 crError("crUnpackExtendAreProgramsResidentNV: %d is out of range", n); -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.cpp
r78265 r79340 58 58 pos = 20 + count * sizeof(*pLocalLength); 59 59 60 if (!DATA_POINTER_CHECK (pState, pos))60 if (!DATA_POINTER_CHECK_SIZE(pState, pos)) 61 61 { 62 62 crError("crUnpackExtendShaderSource: pos %d is out of range", pos); … … 72 72 pos_check = pos; 73 73 74 if (!DATA_POINTER_CHECK (pState, pos_check))74 if (!DATA_POINTER_CHECK_SIZE(pState, pos_check)) 75 75 { 76 76 crError("crUnpackExtendShaderSource: pos %d is out of range", pos); … … 82 82 for (i = 0; i < count; ++i) 83 83 { 84 if (pLocalLength[i] <= 0 || pos_check >= INT32_MAX - pLocalLength[i] || !DATA_POINTER_CHECK (pState, pos_check))84 if (pLocalLength[i] <= 0 || pos_check >= INT32_MAX - pLocalLength[i] || !DATA_POINTER_CHECK_SIZE(pState, pos_check)) 85 85 { 86 86 crError("crUnpackExtendShaderSource: pos %d is out of range", pos_check); … … 90 90 pos_check += pLocalLength[i]; 91 91 92 if (!DATA_POINTER_CHECK (pState, pos_check))92 if (!DATA_POINTER_CHECK_SIZE(pState, pos_check)) 93 93 { 94 94 crError("crUnpackExtendShaderSource: pos %d is out of range", pos_check);
Note:
See TracChangeset
for help on using the changeset viewer.