From 58c56eb398dcc2d4168d4d4dee221197c109f32c Mon Sep 17 00:00:00 2001 From: Pete Batard Date: Fri, 27 Oct 2023 22:43:50 +0200 Subject: [PATCH] [vhd] fix a crash when saving .ffu images with release version * Also update Rufus next to 4.4 --- configure | 20 ++++++++++---------- configure.ac | 2 +- src/rufus.rc | 12 ++++++------ src/vhd.c | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/configure b/configure index 69835a42..06fbccde 100755 --- a/configure +++ b/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for rufus 4.3. +# Generated by GNU Autoconf 2.71 for rufus 4.4. # # Report bugs to . # @@ -611,8 +611,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='rufus' PACKAGE_TARNAME='rufus' -PACKAGE_VERSION='4.3' -PACKAGE_STRING='rufus 4.3' +PACKAGE_VERSION='4.4' +PACKAGE_STRING='rufus 4.4' PACKAGE_BUGREPORT='https://github.com/pbatard/rufus/issues' PACKAGE_URL='https://rufus.ie' @@ -1269,7 +1269,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures rufus 4.3 to adapt to many kinds of systems. +\`configure' configures rufus 4.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1336,7 +1336,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of rufus 4.3:";; + short | recursive ) echo "Configuration of rufus 4.4:";; esac cat <<\_ACEOF @@ -1428,7 +1428,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -rufus configure 4.3 +rufus configure 4.4 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1504,7 +1504,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by rufus $as_me 4.3, which was +It was created by rufus $as_me 4.4, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2767,7 +2767,7 @@ fi # Define the identity of the package. PACKAGE='rufus' - VERSION='4.3' + VERSION='4.4' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -5309,7 +5309,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by rufus $as_me 4.3, which was +This file was extended by rufus $as_me 4.4, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -5365,7 +5365,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -rufus config.status 4.3 +rufus config.status 4.4 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index d1f2b960..be4e41d4 100644 --- a/configure.ac +++ b/configure.ac @@ -1,4 +1,4 @@ -AC_INIT([rufus], [4.3], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.ie]) +AC_INIT([rufus], [4.4], [https://github.com/pbatard/rufus/issues], [rufus], [https://rufus.ie]) AM_INIT_AUTOMAKE([-Wno-portability foreign no-dist no-dependencies]) AC_CONFIG_SRCDIR([src/rufus.c]) AC_CONFIG_MACRO_DIR([m4]) diff --git a/src/rufus.rc b/src/rufus.rc index 544ee160..b865bf40 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 4.3.2090" +CAPTION "Rufus 4.4.2091" FONT 9, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP @@ -392,8 +392,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 4,3,2090,0 - PRODUCTVERSION 4,3,2090,0 + FILEVERSION 4,4,2091,0 + PRODUCTVERSION 4,4,2091,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -411,13 +411,13 @@ BEGIN VALUE "Comments", "https://rufus.ie" VALUE "CompanyName", "Akeo Consulting" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "4.3.2090" + VALUE "FileVersion", "4.4.2091" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2023 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html" - VALUE "OriginalFilename", "rufus-4.3.exe" + VALUE "OriginalFilename", "rufus-4.4.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "4.3.2090" + VALUE "ProductVersion", "4.4.2091" END END BLOCK "VarFileInfo" diff --git a/src/vhd.c b/src/vhd.c index 410ed97c..60508262 100644 --- a/src/vhd.c +++ b/src/vhd.c @@ -1085,9 +1085,9 @@ static DWORD WINAPI FfuSaveImageThread(void* param) { DWORD r; IMG_SAVE* img_save = (IMG_SAVE*)param; - char cmd[MAX_PATH + 128], *letter = "", *label; + char cmd[MAX_PATH + 128], letters[27], *label; - GetDriveLabel(SelectedDrive.DeviceNumber, letter, &label, TRUE); + GetDriveLabel(SelectedDrive.DeviceNumber, letters, &label, TRUE); static_sprintf(cmd, "dism /Capture-Ffu /CaptureDrive:%s /ImageFile:\"%s\" " "/Name:\"%s\" /Description:\"Created by %s (%s)\"", img_save->DevicePath, img_save->ImagePath, label, APPLICATION_NAME, RUFUS_URL);