mirror of
				https://github.com/espressif/esp-idf.git
				synced 2025-11-04 00:51:42 +01:00 
			
		
		
		
	bootloader_support: fix crash in image verification is SHA doesn't match
This commit is contained in:
		
				
					committed by
					
						
						Angus Gratton
					
				
			
			
				
	
			
			
			
						parent
						
							b2ed553bbf
						
					
				
				
					commit
					ba3f47efd6
				
			@@ -222,6 +222,7 @@ static esp_err_t image_load(esp_image_load_mode_t mode, const esp_partition_pos_
 | 
			
		||||
            // No secure boot, but SHA-256 can be appended for basic corruption detection
 | 
			
		||||
            if (sha_handle != NULL && !esp_cpu_in_ocd_debug_mode()) {
 | 
			
		||||
                err = verify_simple_hash(sha_handle, data);
 | 
			
		||||
                sha_handle = NULL; // calling verify_simple_hash finishes sha_handle
 | 
			
		||||
            }
 | 
			
		||||
#endif // SECURE_BOOT_CHECK_SIGNATURE
 | 
			
		||||
        } else { // verify_sha
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user