mirror of
				https://github.com/pbatard/rufus.git
				synced 2024-08-14 23:57:05 +00:00 
			
		
		
		
	[misc] fix inverted memset() parameters
* Also fix artifact name for VS2022 builds.
This commit is contained in:
		
							parent
							
								
									ebaa7d561a
								
							
						
					
					
						commit
						4223fe9681
					
				
					 3 changed files with 10 additions and 9 deletions
				
			
		
							
								
								
									
										2
									
								
								.github/workflows/vs2022.yml
									
										
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.github/workflows/vs2022.yml
									
										
									
									
										vendored
									
									
								
							|  | @ -80,5 +80,5 @@ jobs: | ||||||
|       uses: actions/upload-artifact@v2 |       uses: actions/upload-artifact@v2 | ||||||
|       if: ${{ github.event_name == 'push' }} |       if: ${{ github.event_name == 'push' }} | ||||||
|       with: |       with: | ||||||
|         name: VS2019 |         name: VS2022 | ||||||
|         path: ./*.exe |         path: ./*.exe | ||||||
|  |  | ||||||
|  | @ -1639,7 +1639,8 @@ out: | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| // This is a crude attempt at detecting file systems through their superblock magic.
 | // This is a crude attempt at detecting file systems through their superblock magic.
 | ||||||
| // Note that we only attempt to detect the file systems that Rufus can actually format.
 | // Note that we only attempt to detect the file systems that Rufus can format as
 | ||||||
|  | // well as a couple other maintsream ones.
 | ||||||
| const char* GetFsName(HANDLE hPhysical, LARGE_INTEGER StartingOffset) | const char* GetFsName(HANDLE hPhysical, LARGE_INTEGER StartingOffset) | ||||||
| { | { | ||||||
| 	typedef struct { | 	typedef struct { | ||||||
|  | @ -1713,7 +1714,7 @@ const char* GetFsName(HANDLE hPhysical, LARGE_INTEGER StartingOffset) | ||||||
| 		goto out; | 		goto out; | ||||||
| 	} | 	} | ||||||
| 	// Switch to offset 1024
 | 	// Switch to offset 1024
 | ||||||
| 	memset(buf, sector_size, 0); | 	memset(buf, 0, sector_size); | ||||||
| 	StartingOffset.QuadPart += 0x0400ULL; | 	StartingOffset.QuadPart += 0x0400ULL; | ||||||
| 	if (!SetFilePointerEx(hPhysical, StartingOffset, NULL, FILE_BEGIN)) | 	if (!SetFilePointerEx(hPhysical, StartingOffset, NULL, FILE_BEGIN)) | ||||||
| 		goto out; | 		goto out; | ||||||
|  | @ -1748,7 +1749,7 @@ const char* GetFsName(HANDLE hPhysical, LARGE_INTEGER StartingOffset) | ||||||
| 	// 4. Try to detect UDF through by looking for a "BEA01\0" string at offset 0xC001
 | 	// 4. Try to detect UDF through by looking for a "BEA01\0" string at offset 0xC001
 | ||||||
| 	// NB: This is not thorough UDF detection but good enough for our purpose.
 | 	// NB: This is not thorough UDF detection but good enough for our purpose.
 | ||||||
| 	// For the full specs see: http://www.osta.org/specs/pdf/udf260.pdf
 | 	// For the full specs see: http://www.osta.org/specs/pdf/udf260.pdf
 | ||||||
| 	memset(buf, sector_size, 0); | 	memset(buf, 0, sector_size); | ||||||
| 	StartingOffset.QuadPart += 0x8000ULL - 0x0400ULL; | 	StartingOffset.QuadPart += 0x8000ULL - 0x0400ULL; | ||||||
| 	if (!SetFilePointerEx(hPhysical, StartingOffset, NULL, FILE_BEGIN)) | 	if (!SetFilePointerEx(hPhysical, StartingOffset, NULL, FILE_BEGIN)) | ||||||
| 		goto out; | 		goto out; | ||||||
|  |  | ||||||
							
								
								
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							
							
						
						
									
										10
									
								
								src/rufus.rc
									
										
									
									
									
								
							|  | @ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL | ||||||
| IDD_DIALOG DIALOGEX 12, 12, 232, 326 | IDD_DIALOG DIALOGEX 12, 12, 232, 326 | ||||||
| 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 | ||||||
| EXSTYLE WS_EX_ACCEPTFILES | EXSTYLE WS_EX_ACCEPTFILES | ||||||
| CAPTION "Rufus 3.18.1867" | CAPTION "Rufus 3.18.1868" | ||||||
| FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | FONT 9, "Segoe UI Symbol", 400, 0, 0x0 | ||||||
| BEGIN | BEGIN | ||||||
|     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP |     LTEXT           "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP | ||||||
|  | @ -395,8 +395,8 @@ END | ||||||
| // | // | ||||||
| 
 | 
 | ||||||
| VS_VERSION_INFO VERSIONINFO | VS_VERSION_INFO VERSIONINFO | ||||||
|  FILEVERSION 3,18,1867,0 |  FILEVERSION 3,18,1868,0 | ||||||
|  PRODUCTVERSION 3,18,1867,0 |  PRODUCTVERSION 3,18,1868,0 | ||||||
|  FILEFLAGSMASK 0x3fL |  FILEFLAGSMASK 0x3fL | ||||||
| #ifdef _DEBUG | #ifdef _DEBUG | ||||||
|  FILEFLAGS 0x1L |  FILEFLAGS 0x1L | ||||||
|  | @ -414,13 +414,13 @@ BEGIN | ||||||
|             VALUE "Comments", "https://rufus.ie" |             VALUE "Comments", "https://rufus.ie" | ||||||
|             VALUE "CompanyName", "Akeo Consulting" |             VALUE "CompanyName", "Akeo Consulting" | ||||||
|             VALUE "FileDescription", "Rufus" |             VALUE "FileDescription", "Rufus" | ||||||
|             VALUE "FileVersion", "3.18.1867" |             VALUE "FileVersion", "3.18.1868" | ||||||
|             VALUE "InternalName", "Rufus" |             VALUE "InternalName", "Rufus" | ||||||
|             VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)" |             VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)" | ||||||
|             VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" |             VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" | ||||||
|             VALUE "OriginalFilename", "rufus-3.18.exe" |             VALUE "OriginalFilename", "rufus-3.18.exe" | ||||||
|             VALUE "ProductName", "Rufus" |             VALUE "ProductName", "Rufus" | ||||||
|             VALUE "ProductVersion", "3.18.1867" |             VALUE "ProductVersion", "3.18.1868" | ||||||
|         END |         END | ||||||
|     END |     END | ||||||
|     BLOCK "VarFileInfo" |     BLOCK "VarFileInfo" | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue