Add some size checks when accessing Drives[], mostly needed when DOS_DRIVES is not set to 26, make size parsing not go outside the target array.
Let's not try to assign a drive in the switchlist to a too high number. Don't access imagelist for drives >D when unmounting. Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@4239
This commit is contained in:
		
							parent
							
								
									e90de61263
								
							
						
					
					
						commit
						ad88f982c0
					
				
					 4 changed files with 52 additions and 31 deletions
				
			
		| 
						 | 
				
			
			@ -75,8 +75,10 @@ void incrementFDD(void);
 | 
			
		|||
 | 
			
		||||
#define MAX_HDD_IMAGES 2
 | 
			
		||||
 | 
			
		||||
extern imageDisk *imageDiskList[2 + MAX_HDD_IMAGES];
 | 
			
		||||
extern imageDisk *diskSwap[20];
 | 
			
		||||
#define MAX_DISK_IMAGES (2 + MAX_HDD_IMAGES)
 | 
			
		||||
 | 
			
		||||
extern imageDisk *imageDiskList[MAX_DISK_IMAGES];
 | 
			
		||||
extern imageDisk *diskSwap[MAX_SWAPPABLE_DISKS];
 | 
			
		||||
extern Bit32s swapPosition;
 | 
			
		||||
extern Bit16u imgDTASeg; /* Real memory location of temporary DTA pointer for fat image disk access */
 | 
			
		||||
extern RealPt imgDTAPtr; /* Real memory location of temporary DTA pointer for fat image disk access */
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue