Changeset 205 for sbliveos2/trunk/drv16/rm.cpp
- Timestamp:
- Jun 14, 2007, 3:33:51 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sbliveos2/trunk/drv16/rm.cpp
r178 r205 99 99 * allocate resources. 100 100 */ 101 ResourceManager::ResourceManager(ULONG pciId)101 ResourceManager::ResourceManager(ULONG) 102 102 { 103 103 APIRET rc; … … 418 418 int nResources; // Number of resources. 419 419 PRESOURCELIST pRL; // Return value, pointer to resource list 420 // construct ured in the heap.420 // constructed in the heap. 421 421 // Count up number of resources. 422 422 for ( i=0, nResources=0; i<MAX_ISA_Dev_IO; ++i) { … … 438 438 439 439 // Fill in resource list values. 440 _fmemset( (PVOID) pRL, 0, nBytes ); 440 _fmemset( (PVOID) pRL, 0, nBytes ); // 13 Jun 07 SHL 441 441 pRL->Count = nResources; 442 442 … … 485 485 } 486 486 487 return pRL;487 return (NPRESOURCELIST)pRL; 488 488 } 489 489 … … 652 652 { 653 653 APIRET rc; 654 // 13 Jun 07 SHL fixme to check overflow even though unlikely 654 655 USHORT nBytes = 655 sizeof(AHRESOURCE) + (sizeof(HRESOURCE) * pResourceList->Count);656 sizeof(AHRESOURCE) + (sizeof(HRESOURCE) * (USHORT)pResourceList->Count); 656 657 NPAHRESOURCE pahResource = (NPAHRESOURCE) malloc( nBytes ); 657 658 // Handles for allocated resources are saved here.
Note:
See TracChangeset
for help on using the changeset viewer.