NFC: Fix 0 block write possibility in Mifare Classic emulation (#2474)
Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
		
							parent
							
								
									5b05aeea82
								
							
						
					
					
						commit
						0190a161ba
					
				| @ -291,6 +291,10 @@ bool mf_classic_is_allowed_access_data_block( | |||||||
|     uint8_t* sector_trailer = |     uint8_t* sector_trailer = | ||||||
|         data->block[mf_classic_get_sector_trailer_num_by_block(block_num)].value; |         data->block[mf_classic_get_sector_trailer_num_by_block(block_num)].value; | ||||||
| 
 | 
 | ||||||
|  |     if(block_num == 0 && action == MfClassicActionDataWrite) { | ||||||
|  |         return false; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     uint8_t sector_block; |     uint8_t sector_block; | ||||||
|     if(block_num <= 128) { |     if(block_num <= 128) { | ||||||
|         sector_block = block_num & 0x03; |         sector_block = block_num & 0x03; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 AloneLiberty
						AloneLiberty