From 4223fe9681802628cd9090dd79bd81d22fd01aed Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 11 Feb 2022 18:42:38 +0000 Subject: [PATCH] [misc] fix inverted memset() parameters * Also fix artifact name for VS2022 builds. --- .github/workflows/vs2022.yml | 2 +- src/drive.c | 7 ++++--- src/rufus.rc | 10 +++++----- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/.github/workflows/vs2022.yml b/.github/workflows/vs2022.yml index 488bc216..df98e554 100644 --- a/.github/workflows/vs2022.yml +++ b/.github/workflows/vs2022.yml @@ -80,5 +80,5 @@ jobs: uses: actions/upload-artifact@v2 if: ${{ github.event_name == 'push' }} with: - name: VS2019 + name: VS2022 path: ./*.exe diff --git a/src/drive.c b/src/drive.c index f1079b96..ee715676 100644 --- a/src/drive.c +++ b/src/drive.c @@ -1639,7 +1639,8 @@ out: } // 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) { typedef struct { @@ -1713,7 +1714,7 @@ const char* GetFsName(HANDLE hPhysical, LARGE_INTEGER StartingOffset) goto out; } // Switch to offset 1024 - memset(buf, sector_size, 0); + memset(buf, 0, sector_size); StartingOffset.QuadPart += 0x0400ULL; if (!SetFilePointerEx(hPhysical, StartingOffset, NULL, FILE_BEGIN)) 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 // 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 - memset(buf, sector_size, 0); + memset(buf, 0, sector_size); StartingOffset.QuadPart += 0x8000ULL - 0x0400ULL; if (!SetFilePointerEx(hPhysical, StartingOffset, NULL, FILE_BEGIN)) goto out; diff --git a/src/rufus.rc b/src/rufus.rc index 7c87f66c..0e3c2618 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 232, 326 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU EXSTYLE WS_EX_ACCEPTFILES -CAPTION "Rufus 3.18.1867" +CAPTION "Rufus 3.18.1868" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -395,8 +395,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 3,18,1867,0 - PRODUCTVERSION 3,18,1867,0 + FILEVERSION 3,18,1868,0 + PRODUCTVERSION 3,18,1868,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -414,13 +414,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "3.18.1867" + VALUE "FileVersion", "3.18.1868" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2022 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" VALUE "OriginalFilename", "rufus-3.18.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "3.18.1867" + VALUE "ProductVersion", "3.18.1868" END END BLOCK "VarFileInfo"