mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[iso] fix a possible crash when scanning the install.wim version
* Closes #659 * Issue and fix reported by DaPa
This commit is contained in:
		
							parent
							
								
									b7d1b77e4f
								
							
						
					
					
						commit
						961ca93a51
					
				
					 2 changed files with 13 additions and 9 deletions
				
			
		
							
								
								
									
										12
									
								
								src/iso.c
									
										
									
									
									
								
							
							
						
						
									
										12
									
								
								src/iso.c
									
										
									
									
									
								
							|  | @ -690,7 +690,7 @@ BOOL ExtractISO(const char* src_iso, const char* dest_dir, BOOL scan) | ||||||
| 		iso_blocking_status = 0; | 		iso_blocking_status = 0; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/* First try to open as UDF - fallback to ISO if it failed */ | 	// First try to open as UDF - fallback to ISO if it failed
 | ||||||
| 	p_udf = udf_open(src_iso); | 	p_udf = udf_open(src_iso); | ||||||
| 	if (p_udf == NULL) | 	if (p_udf == NULL) | ||||||
| 		goto try_iso; | 		goto try_iso; | ||||||
|  | @ -933,7 +933,7 @@ int64_t ExtractISOFile(const char* iso, const char* iso_file, const char* dest_f | ||||||
| 		goto out; | 		goto out; | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	/* First try to open as UDF - fallback to ISO if it failed */ | 	// First try to open as UDF - fallback to ISO if it failed
 | ||||||
| 	p_udf = udf_open(iso); | 	p_udf = udf_open(iso); | ||||||
| 	if (p_udf == NULL) | 	if (p_udf == NULL) | ||||||
| 		goto try_iso; | 		goto try_iso; | ||||||
|  | @ -1024,10 +1024,14 @@ uint32_t GetInstallWimVersion(const char* iso) | ||||||
| 	iso9660_stat_t *p_statbuf = NULL; | 	iso9660_stat_t *p_statbuf = NULL; | ||||||
| 
 | 
 | ||||||
| 	wim_path = safe_strdup(&img_report.install_wim_path[2]); | 	wim_path = safe_strdup(&img_report.install_wim_path[2]); | ||||||
| 	for (p = wim_path; p != 0; p++) | 	if (wim_path == NULL) | ||||||
|  | 		goto out; | ||||||
|  | 	// UDF indiscriminately accepts slash or backslash delimiters,
 | ||||||
|  | 	// but ISO-9660 requires slash
 | ||||||
|  | 	for (p = wim_path; *p != 0; p++) | ||||||
| 		if (*p == '\\') *p = '/'; | 		if (*p == '\\') *p = '/'; | ||||||
| 
 | 
 | ||||||
| 	/* First try to open as UDF - fallback to ISO if it failed */ | 	// First try to open as UDF - fallback to ISO if it failed
 | ||||||
| 	p_udf = udf_open(iso); | 	p_udf = udf_open(iso); | ||||||
| 	if (p_udf == NULL) | 	if (p_udf == NULL) | ||||||
| 		goto try_iso; | 		goto try_iso; | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| 
 | 
 | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 242, 376 | IDD_DIALOG DIALOGEX 12, 12, 242, 376 | ||||||
| STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | ||||||
| CAPTION "Rufus 2.6.818" | CAPTION "Rufus 2.6.819" | ||||||
| FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | FONT 8, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 |     LTEXT           "Device",IDS_DEVICE_TXT,9,6,200,8 | ||||||
|  | @ -319,8 +319,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 2,6,818,0 |  FILEVERSION 2,6,819,0 | ||||||
|  PRODUCTVERSION 2,6,818,0 |  PRODUCTVERSION 2,6,819,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -337,13 +337,13 @@ BEGIN | ||||||
|         BEGIN |         BEGIN | ||||||
|             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" |             VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "2.6.818" |             VALUE "FileVersion", "2.6.819" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" |             VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" | ||||||
|             VALUE "OriginalFilename", "rufus.exe" |             VALUE "OriginalFilename", "rufus.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "2.6.818" |             VALUE "ProductVersion", "2.6.819" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue