Changeset 31363 in vbox for trunk/src/VBox/VMM
- Timestamp:
- Aug 4, 2010 4:10:22 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/VMM/PGMSharedPage.cpp
r30887 r31363 89 89 PGMMREGISTERSHAREDMODULEREQ *ppSharedModule = NULL; 90 90 91 if (pSharedModules[cSharedModules]) 91 if ( cSharedModules < RT_ELEMENTS(pSharedModules) 92 && pSharedModules[cSharedModules]) 92 93 { 93 94 for (unsigned i = 0; i < cSharedModules; i++) … … 104 105 ppSharedModule = &pSharedModules[cSharedModules]; 105 106 106 *ppSharedModule = (PGMMREGISTERSHAREDMODULEREQ)RTMemAllocZ(RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions])); 107 memcpy(*ppSharedModule, pReq, RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions])); 108 cSharedModules++; 107 if (ppSharedModule) 108 { 109 *ppSharedModule = (PGMMREGISTERSHAREDMODULEREQ)RTMemAllocZ(RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions])); 110 memcpy(*ppSharedModule, pReq, RT_OFFSETOF(GMMREGISTERSHAREDMODULEREQ, aRegions[cRegions])); 111 cSharedModules++; 112 } 109 113 } 110 114 # endif
Note:
See TracChangeset
for help on using the changeset viewer.