mirror of
				https://gitlab.com/freepascal.org/fpc/source.git
				synced 2025-11-04 08:19:36 +01:00 
			
		
		
		
	+ check whether the pointer passed to SysTinyReAllocMem is within the heap area
(the same check used as in SysTinyFreeMem) git-svn-id: trunk@28721 -
This commit is contained in:
		
							parent
							
								
									5fc019f31a
								
							
						
					
					
						commit
						e9dc9735a0
					
				@ -277,6 +277,9 @@
 | 
			
		||||
          end
 | 
			
		||||
        else
 | 
			
		||||
          begin
 | 
			
		||||
            if (TTinyHeapPointerArithmeticType(p) < TTinyHeapPointerArithmeticType(HeapOrg)) or
 | 
			
		||||
               (TTinyHeapPointerArithmeticType(p) >= TTinyHeapPointerArithmeticType(HeapPtr)) then
 | 
			
		||||
              HandleError(204);
 | 
			
		||||
            oldsize := FindSize(p);
 | 
			
		||||
            OldAllocSize := align(oldsize+sizeof(TTinyHeapMemBlockSize), TinyHeapAllocGranularity);
 | 
			
		||||
            NewAllocSize := align(size+sizeof(TTinyHeapMemBlockSize), TinyHeapAllocGranularity);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user