Changeset 76787 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_program.c
- Timestamp:
- Jan 11, 2019 8:00:15 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_program.c
r73223 r76787 45 45 GLdouble *params; 46 46 47 if (num >= UINT32_MAX / (4 * sizeof(GLdouble)))47 if (num <= 0 || num >= INT32_MAX / (4 * sizeof(GLdouble))) 48 48 { 49 49 crError("crUnpackExtendProgramParameters4dvNV: parameter 'num' is out of range"); … … 71 71 GLfloat *params; 72 72 73 if (num >= UINT32_MAX / (4 * sizeof(GLfloat)))73 if (num <= 0 || num >= INT32_MAX / (4 * sizeof(GLfloat))) 74 74 { 75 75 crError("crUnpackExtendProgramParameters4fvNV: parameter 'num' is out of range"); … … 95 95 const GLuint *programs = DATA_POINTER(12, const GLuint); 96 96 97 if (n > UINT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(20 + n * sizeof(GLuint)))97 if (n <= 0 || n >= INT32_MAX / sizeof(GLuint) / 4 || !DATA_POINTER_CHECK(20 + n * sizeof(GLuint))) 98 98 { 99 99 crError("crUnpackExtendAreProgramsResidentNV: %d is out of range", n); … … 226 226 const GLubyte *name = DATA_POINTER(16, GLubyte); 227 227 228 if (len > UINT32_MAX / 4 || !DATA_POINTER_CHECK(16 + len + 8))228 if (len <= 0 || len >= INT32_MAX / 4 || !DATA_POINTER_CHECK(16 + len + 8)) 229 229 { 230 230 crError("crUnpackExtendGetProgramNamedParameterdvNV: len %d is out of range", len); … … 243 243 const GLubyte *name = DATA_POINTER(16, GLubyte); 244 244 245 if (len > UINT32_MAX / 4 || !DATA_POINTER_CHECK(16 + len + 8))245 if (len <= 0 || len >= INT32_MAX / 4 || !DATA_POINTER_CHECK(16 + len + 8)) 246 246 { 247 247 crError("crUnpackExtendGetProgramNamedParameterfvNV: len %d is out of range", len);
Note:
See TracChangeset
for help on using the changeset viewer.