diff --git a/Makefile.am b/Makefile.am index 55483219..cf558e1d 100644 --- a/Makefile.am +++ b/Makefile.am @@ -5,6 +5,7 @@ TARGET = rufus # NB: UPX v3.09 or later is needed for LZMA compression (http://upx.sourceforge.net/) release: all @mv src/$(TARGET)$(EXEEXT) . + @sleep 1 @$(STRIP) $(TARGET)$(EXEEXT) @upx --lzma $(TARGET)$(EXEEXT) @mv $(TARGET)$(EXEEXT) $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) diff --git a/Makefile.in b/Makefile.in index e57d61f5..92df4cd1 100644 --- a/Makefile.in +++ b/Makefile.in @@ -502,6 +502,7 @@ uninstall-am: # NB: UPX v3.09 or later is needed for LZMA compression (http://upx.sourceforge.net/) release: all @mv src/$(TARGET)$(EXEEXT) . + @sleep 1 @$(STRIP) $(TARGET)$(EXEEXT) @upx --lzma $(TARGET)$(EXEEXT) @mv $(TARGET)$(EXEEXT) $(TARGET)-$(VERSION)$(SUFFIX)$(EXEEXT) diff --git a/_release.sh b/_release.sh index 24a8b18c..32b3716e 100644 --- a/_release.sh +++ b/_release.sh @@ -1,5 +1,5 @@ #!/bin/sh rm -f rufus*.exe ./configure --disable-debug "$@" -make -j4 clean -make -j4 release +make -j12 clean +make -j12 release diff --git a/rufus.sln b/rufus.sln index 4e22dae8..0e7aa061 100644 --- a/rufus.sln +++ b/rufus.sln @@ -1,6 +1,7 @@ + Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2013 -VisualStudioVersion = 12.0.31101.0 +# Visual Studio 14 +VisualStudioVersion = 14.0.23107.0 MinimumVisualStudioVersion = 10.0.40219.1 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "rufus", "src\.msvc\rufus.vcxproj", "{731858A7-0303-4988-877B-9C0DD6471864}" EndProject diff --git a/src/.msvc/rufus.vcxproj b/src/.msvc/rufus.vcxproj index abfac84a..7805730b 100644 --- a/src/.msvc/rufus.vcxproj +++ b/src/.msvc/rufus.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -29,23 +29,23 @@ Application Unicode true - v120_xp + v140_xp Application Unicode - v120_xp + v140_xp Application Unicode true - v120 + v140 Application Unicode - v120 + v140 @@ -88,6 +88,7 @@ CompileAsC true false + 4091;28252;28253;%(DisableSpecificWarnings) setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) @@ -115,6 +116,7 @@ CompileAsC true false + 4091;28252;28253;%(DisableSpecificWarnings) setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) @@ -138,6 +140,7 @@ CompileAsC true false + 4091;28252;28253;%(DisableSpecificWarnings) setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) @@ -164,6 +167,7 @@ CompileAsC true false + 4091;28252;28253;%(DisableSpecificWarnings) setupapi.lib;comctl32.lib;wininet.lib;shlwapi.lib;%(AdditionalDependencies) diff --git a/src/bled/.msvc/bled.vcxproj b/src/bled/.msvc/bled.vcxproj index 0cc0e286..46274823 100644 --- a/src/bled/.msvc/bled.vcxproj +++ b/src/bled/.msvc/bled.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -65,22 +65,22 @@ StaticLibrary Unicode - v120 + v140 StaticLibrary Unicode - v120 + v140 StaticLibrary Unicode - v120 + v140 StaticLibrary Unicode - v120 + v140 diff --git a/src/bled/decompress_unlzma.c b/src/bled/decompress_unlzma.c index 317c0788..781166ce 100644 --- a/src/bled/decompress_unlzma.c +++ b/src/bled/decompress_unlzma.c @@ -264,14 +264,15 @@ unpack_lzma_stream(transformer_state_t *xstate) while (global_pos + buffer_pos < header.dst_size) { int pos_state = (buffer_pos + global_pos) & pos_state_mask; - uint16_t *prob = p + LZMA_IS_MATCH + (state << LZMA_NUM_POS_BITS_MAX) + pos_state; + uintptr_t off1 = LZMA_IS_MATCH + (state << LZMA_NUM_POS_BITS_MAX) + pos_state; + uint16_t *prob1 = p + off1; - if (!rc_is_bit_1(rc, prob)) { + if (!rc_is_bit_1(rc, prob1)) { static const char next_state[LZMA_NUM_STATES] = { 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 4, 5 }; int mi = 1; - prob = (p + LZMA_LITERAL + prob1 = (p + LZMA_LITERAL + (LZMA_LIT_SIZE * ((((buffer_pos + global_pos) & literal_pos_mask) << lc) + (previous_byte >> (8 - lc)) ) @@ -290,13 +291,13 @@ unpack_lzma_stream(transformer_state_t *xstate) match_byte <<= 1; bit = match_byte & 0x100; - bit ^= (rc_get_bit(rc, prob + 0x100 + bit + mi, &mi) << 8); /* 0x100 or 0 */ + bit ^= (rc_get_bit(rc, prob1 + 0x100 + bit + mi, &mi) << 8); /* 0x100 or 0 */ if (bit) break; } while (mi < 0x100); } while (mi < 0x100) { - rc_get_bit(rc, prob + mi, &mi); + rc_get_bit(rc, prob1 + mi, &mi); } state = next_state[state]; @@ -333,10 +334,8 @@ unpack_lzma_stream(transformer_state_t *xstate) } else { prob2 += LZMA_IS_REP_G0 - LZMA_IS_REP; if (!rc_is_bit_1(rc, prob2)) { - prob2 = (p + LZMA_IS_REP_0_LONG - + (state << LZMA_NUM_POS_BITS_MAX) - + pos_state - ); + uintptr_t off2 = LZMA_IS_REP_0_LONG + (state << LZMA_NUM_POS_BITS_MAX) + pos_state; + prob2 = p + off2; if (!rc_is_bit_1(rc, prob2)) { #if ENABLE_FEATURE_LZMA_FAST uint32_t pos = buffer_pos - rep0; @@ -397,13 +396,13 @@ unpack_lzma_stream(transformer_state_t *xstate) if (state < 4) { int pos_slot; + uintptr_t off3 = LZMA_POS_SLOT + + ((len < LZMA_NUM_LEN_TO_POS_STATES ? len : LZMA_NUM_LEN_TO_POS_STATES - 1) + << LZMA_NUM_POS_SLOT_BITS); uint16_t *prob3; state += LZMA_NUM_LIT_STATES; - prob3 = p + LZMA_POS_SLOT + - ((len < LZMA_NUM_LEN_TO_POS_STATES ? len : - LZMA_NUM_LEN_TO_POS_STATES - 1) - << LZMA_NUM_POS_SLOT_BITS); + prob3 = p + off3; rc_bit_tree_decode(rc, prob3, LZMA_NUM_POS_SLOT_BITS, &pos_slot); rep0 = pos_slot; diff --git a/src/checksum.c b/src/checksum.c index a715a24d..20fa181e 100644 --- a/src/checksum.c +++ b/src/checksum.c @@ -541,7 +541,8 @@ INT_PTR CALLBACK ChecksumCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM SetWindowTextA(GetDlgItem(hDlg, IDC_MD5), md5str); SetWindowTextA(GetDlgItem(hDlg, IDC_SHA1), sha1str); for (i=(int)safe_strlen(image_path); (i>0)&&(image_path[i]!='\\'); i--); - SetWindowTextU(hDlg, &image_path[i+1]); + if (image_path != NULL) // VS code analysis has a false positive on this one + SetWindowTextU(hDlg, &image_path[i+1]); // Set focus on the OK button SendMessage(hDlg, WM_NEXTDLGCTL, (WPARAM)GetDlgItem(hDlg, IDOK), TRUE); CenterDialog(hDlg); diff --git a/src/dos.c b/src/dos.c index 4e7ac11a..a08aa741 100644 --- a/src/dos.c +++ b/src/dos.c @@ -299,6 +299,9 @@ static BOOL ExtractMSDOS(const char* path) "KEYB COM", "KEYBOARDSYS", "KEYBRD2 SYS", "KEYBRD3 SYS", "KEYBRD4 SYS", "DISPLAY SYS", "EGA CPI", "EGA2 CPI", "EGA3 CPI" }; + if (path == NULL) + return FALSE; + // Reduce the visible mess by placing all the locale files into a subdir safe_strcpy(locale_path, sizeof(locale_path), path); safe_strcat(locale_path, sizeof(locale_path), "LOCALE\\"); @@ -386,7 +389,7 @@ BOOL ExtractFreeDOS(const char* path) hFile = CreateFileA(filename, GENERIC_READ|GENERIC_WRITE, FILE_SHARE_READ|FILE_SHARE_WRITE, NULL, CREATE_ALWAYS, (i<2)?(FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_SYSTEM):FILE_ATTRIBUTE_NORMAL, NULL); - if (hFile == INVALID_HANDLE_VALUE) { + if ((hFile == NULL) || (hFile == INVALID_HANDLE_VALUE)) { uprintf("Unable to create file '%s': %s.\n", filename, WindowsErrorString()); return FALSE; } diff --git a/src/drive.c b/src/drive.c index 85497e63..98cf7ec1 100644 --- a/src/drive.c +++ b/src/drive.c @@ -28,6 +28,7 @@ #include "msapi_utf8.h" #include "rufus.h" +#include "file.h" #include "drive.h" #include "resource.h" #include "sys_types.h" @@ -585,21 +586,22 @@ const struct {int (*fn)(FILE *fp); char* str;} known_mbr[] = { BOOL AnalyzeMBR(HANDLE hPhysicalDrive, const char* TargetName) { const char* mbr_name = "Master Boot Record"; - FILE fake_fd = { 0 }; + FAKE_FD fake_fd = { 0 }; + FILE* fp = (FILE*)&fake_fd; int i; - fake_fd._ptr = (char*)hPhysicalDrive; - fake_fd._bufsiz = SelectedDrive.Geometry.BytesPerSector; + fake_fd._handle = (char*)hPhysicalDrive; + fake_fd._sector_size = SelectedDrive.Geometry.BytesPerSector; // Might need correction, as we use this method for images and we may not have a target UFD yet - if (fake_fd._bufsiz < 512) - fake_fd._bufsiz = 512; + if (fake_fd._sector_size < 512) + fake_fd._sector_size = 512; - if (!is_br(&fake_fd)) { + if (!is_br(fp)) { uprintf("%s does not have an x86 %s\n", TargetName, mbr_name); return FALSE; } for (i=0; i - + Debug @@ -27,23 +27,23 @@ StaticLibrary Unicode true - v120 + v140 StaticLibrary Unicode - v120 + v140 StaticLibrary Unicode true - v120 + v140 StaticLibrary Unicode - v120 + v140 @@ -79,6 +79,7 @@ MultiThreadedDebug Level3 ProgramDatabase + 28252;28253 true @@ -93,6 +94,7 @@ MultiThreadedDebug Level3 ProgramDatabase + 28252;28253 true @@ -104,6 +106,7 @@ HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreaded Level3 + 28252;28253 true @@ -117,6 +120,7 @@ HAVE_STRING_H;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) MultiThreaded Level3 + 28252;28253 true @@ -129,6 +133,9 @@ + + + diff --git a/src/getopt/.msvc/getopt.vcxproj.filters b/src/getopt/.msvc/getopt.vcxproj.filters index 2e23d852..58a2840f 100644 --- a/src/getopt/.msvc/getopt.vcxproj.filters +++ b/src/getopt/.msvc/getopt.vcxproj.filters @@ -23,4 +23,7 @@ Header Files + + + \ No newline at end of file diff --git a/src/iso.c b/src/iso.c index 6bcc0633..ac05e3fe 100644 --- a/src/iso.c +++ b/src/iso.c @@ -194,7 +194,7 @@ static BOOL check_iso_props(const char* psz_dirname, int64_t i_file_length, cons } // Check for "install.wim" or "install.swm" in "/sources" - if (safe_stricmp(psz_dirname, install_wim_path) == 0) { + if ((install_wim_path != NULL) && (safe_stricmp(psz_dirname, install_wim_path) == 0)) { for (i=0; i= 1900) #define HAVE_SNPRINTF 1 -/* The equivalent of snprintf on MSVC is _snprintf */ -#define snprintf _snprintf +#endif + +/* Define to 1 if you have the `vsnprintf' function. */ +#if defined(_MSC_VER) && (_MSC_VER >= 1900) +#define HAVE_VSNPRINTF +#endif /* Define to 1 if you have the header file. */ #define HAVE_STDARG_H 1 diff --git a/src/libcdio/driver/.msvc/driver.vcxproj b/src/libcdio/driver/.msvc/driver.vcxproj index 0daaebaf..ac78182f 100644 --- a/src/libcdio/driver/.msvc/driver.vcxproj +++ b/src/libcdio/driver/.msvc/driver.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -36,6 +36,7 @@ + @@ -44,7 +45,6 @@ - @@ -59,27 +59,27 @@ StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 diff --git a/src/libcdio/driver/.msvc/driver.vcxproj.filters b/src/libcdio/driver/.msvc/driver.vcxproj.filters index 3b9abb15..13592e79 100644 --- a/src/libcdio/driver/.msvc/driver.vcxproj.filters +++ b/src/libcdio/driver/.msvc/driver.vcxproj.filters @@ -79,9 +79,6 @@ Header Files - - Header Files - Header Files @@ -91,5 +88,8 @@ Header Files + + Header Files + \ No newline at end of file diff --git a/src/libcdio/driver/logging.c b/src/libcdio/driver/logging.c index 0494d456..ef54ab87 100644 --- a/src/libcdio/driver/logging.c +++ b/src/libcdio/driver/logging.c @@ -33,8 +33,8 @@ #endif #include +#include #include "cdio_assert.h" -#include "portable.h" cdio_log_level_t cdio_loglevel_default = CDIO_LOG_WARN; diff --git a/src/libcdio/driver/sector.c b/src/libcdio/driver/sector.c index 3ca2fb7a..280365b3 100644 --- a/src/libcdio/driver/sector.c +++ b/src/libcdio/driver/sector.c @@ -24,8 +24,8 @@ #include #include #include +#include #include "cdio_assert.h" -#include "portable.h" #ifdef HAVE_STDIO_H #include diff --git a/src/libcdio/iso9660/.msvc/iso9660.vcxproj b/src/libcdio/iso9660/.msvc/iso9660.vcxproj index ec308fa1..86ba1481 100644 --- a/src/libcdio/iso9660/.msvc/iso9660.vcxproj +++ b/src/libcdio/iso9660/.msvc/iso9660.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -24,6 +24,7 @@ + @@ -50,27 +51,27 @@ StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 diff --git a/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters b/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters index ab7ced77..53c3514f 100644 --- a/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters +++ b/src/libcdio/iso9660/.msvc/iso9660.vcxproj.filters @@ -50,6 +50,9 @@ Header Files + + Header Files + diff --git a/src/libcdio/iso9660/iso9660.c b/src/libcdio/iso9660/iso9660.c index d9f07f2e..6bdf9c5e 100644 --- a/src/libcdio/iso9660/iso9660.c +++ b/src/libcdio/iso9660/iso9660.c @@ -31,6 +31,7 @@ const char ISO_STANDARD_ID[] = {'C', 'D', '0', '0', '1'}; #include #include #include +#include #include #include diff --git a/src/libcdio/iso9660/iso9660_fs.c b/src/libcdio/iso9660/iso9660_fs.c index e2b9f0a6..ff0b70da 100644 --- a/src/libcdio/iso9660/iso9660_fs.c +++ b/src/libcdio/iso9660/iso9660_fs.c @@ -47,6 +47,7 @@ #include #include #include +#include /* Private headers */ #include "cdio_assert.h" diff --git a/src/libcdio/udf/.msvc/udf.vcxproj b/src/libcdio/udf/.msvc/udf.vcxproj index 6be96843..719c49b8 100644 --- a/src/libcdio/udf/.msvc/udf.vcxproj +++ b/src/libcdio/udf/.msvc/udf.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -45,27 +45,27 @@ StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 diff --git a/src/ms-sys/.msvc/ms-sys.vcxproj b/src/ms-sys/.msvc/ms-sys.vcxproj index 9643a8c7..befb7534 100644 --- a/src/ms-sys/.msvc/ms-sys.vcxproj +++ b/src/ms-sys/.msvc/ms-sys.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -81,27 +81,27 @@ StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 diff --git a/src/ms-sys/br.c b/src/ms-sys/br.c index 1ea0caac..f096608f 100644 --- a/src/ms-sys/br.c +++ b/src/ms-sys/br.c @@ -174,10 +174,10 @@ int is_zero_mbr(FILE *fp) static int write_bootmark(FILE *fp) { unsigned char aucRef[] = {0x55, 0xAA}; - int pos = 0x1FE; + uint32_t pos = 0x1FE; + FAKE_FD* fd = (FAKE_FD*)fp; - /* We use fp->_bufsiz as our sector size indicator */ - for (pos = 0x1FE; pos < fp->_bufsiz; pos += 0x200) { + for (pos = 0x1FE; pos < fd->_sector_size; pos += 0x200) { if (!write_data(fp, pos, aucRef, sizeof(aucRef))) return 0; } diff --git a/src/ms-sys/file.c b/src/ms-sys/file.c index 153c194a..30c4f766 100644 --- a/src/ms-sys/file.c +++ b/src/ms-sys/file.c @@ -89,19 +89,20 @@ int64_t read_sectors(HANDLE hDrive, uint64_t SectorSize, } /* - * The following calls use a bastardized fp on Windows that contains: - * fp->_ptr: a Windows handle - * fp->_bufsiz: the sector size - * fp->_cnt: a file offset + * The following calls use a hijacked fp on Windows that contains: + * fp->_handle: a Windows handle + * fp->_sector_size: the sector size + * fp->_offset: a file offset */ int contains_data(FILE *fp, uint64_t Position, const void *pData, uint64_t Len) { unsigned char aucBuf[MAX_DATA_LEN]; - HANDLE hDrive = (HANDLE)fp->_ptr; - uint64_t SectorSize = (uint64_t)fp->_bufsiz; + FAKE_FD* fd = (FAKE_FD*)fp; + HANDLE hDrive = (HANDLE)fd->_handle; + uint64_t SectorSize = (uint64_t)fd->_sector_size; uint64_t StartSector, EndSector, NumSectors; - Position += (uint64_t)fp->_cnt; + Position += fd->_offset; StartSector = Position/SectorSize; EndSector = (Position+Len+SectorSize-1)/SectorSize; @@ -133,10 +134,11 @@ int write_data(FILE *fp, uint64_t Position, const void *pData, uint64_t Len) { unsigned char aucBuf[MAX_DATA_LEN]; - HANDLE hDrive = (HANDLE)fp->_ptr; - uint64_t SectorSize = (uint64_t)fp->_bufsiz; + FAKE_FD* fd = (FAKE_FD*)fp; + HANDLE hDrive = (HANDLE)fd->_handle; + uint64_t SectorSize = (uint64_t)fd->_sector_size; uint64_t StartSector, EndSector, NumSectors; - Position += (uint64_t)fp->_cnt; + Position += fd->_offset; StartSector = Position/SectorSize; EndSector = (Position+Len+SectorSize-1)/SectorSize; diff --git a/src/ms-sys/inc/file.h b/src/ms-sys/inc/file.h index 0e631153..6cf1ff1b 100644 --- a/src/ms-sys/inc/file.h +++ b/src/ms-sys/inc/file.h @@ -6,6 +6,13 @@ /* Max valid value of uiLen for contains_data */ #define MAX_DATA_LEN 32768 +/* We hijack the FILE structure for our own needs */ +typedef struct { + void *_handle; + uint64_t _offset; + uint32_t _sector_size; +} FAKE_FD; + /* Checks if a file contains a data pattern of length Len at position Position. The file pointer will change when calling this function! */ int contains_data(FILE *fp, uint64_t Position, diff --git a/src/net.c b/src/net.c index 59d352c7..25bc9966 100644 --- a/src/net.c +++ b/src/net.c @@ -270,6 +270,9 @@ DWORD DownloadFile(const char* url, const char* file, HWND hProgressDialog) SendMessage(hProgressDialog, UM_PROGRESS_INIT, 0, 0); } + if (file == NULL) + goto out; + for (last_slash = safe_strlen(file); last_slash != 0; last_slash--) { if ((file[last_slash] == '/') || (file[last_slash] == '\\')) { last_slash++; diff --git a/src/registry.h b/src/registry.h index 89dd7f62..c40e60d9 100644 --- a/src/registry.h +++ b/src/registry.h @@ -59,15 +59,20 @@ static __inline BOOL _GetRegistryKey(HKEY key_root, const char* key_name, DWORD LONG s; HKEY hSoftware = NULL, hApp = NULL; DWORD dwDisp, dwType = -1, dwSize = dest_size; - char long_key_name[256] = "SOFTWARE\\"; + // VS Code Analysis complains if we don't break our initialization into chars + char long_key_name[256] = { 0 }; memset(dest, 0, dest_size); + if (key_name == NULL) + return FALSE; + for (i=safe_strlen(key_name); i>0; i--) { if (key_name[i] == '\\') break; } if (i != 0) { + strcpy(long_key_name, "SOFTWARE\\"); safe_strcat(long_key_name, sizeof(long_key_name), key_name); long_key_name[sizeof("SOFTWARE\\") + i-1] = 0; i++; diff --git a/src/rufus.c b/src/rufus.c index 6045cce5..3c08745d 100644 --- a/src/rufus.c +++ b/src/rufus.c @@ -2918,14 +2918,14 @@ relaunch: continue; } // Alt-I => Toggle ISO support - // This is useful if you have a dual ISO/DD image and you want to force Rufus to use + // This is useful if you have an ISOHybrid image and you want to force Rufus to use // DD-mode when writing the data. if ((msg.message == WM_SYSKEYDOWN) && (msg.wParam == 'I')) { enable_iso = !enable_iso; PrintStatus2000(lmprintf(MSG_262), enable_iso); if (image_path != NULL) { iso_provided = TRUE; - PostMessage(hDlg, WM_COMMAND, IDC_SELECT_ISO, 0); + SendMessage(hDlg, WM_COMMAND, IDC_SELECT_ISO, 0); } continue; } diff --git a/src/rufus.rc b/src/rufus.rc index 40dab405..c0e9396d 100644 --- a/src/rufus.rc +++ b/src/rufus.rc @@ -32,7 +32,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL IDD_DIALOG DIALOGEX 12, 12, 242, 376 STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Rufus 2.3.695" +CAPTION "Rufus 2.3.696" FONT 8, "Segoe UI Symbol", 400, 0, 0x0 BEGIN LTEXT "Device",IDS_DEVICE_TXT,9,6,200,8 @@ -298,8 +298,8 @@ END // VS_VERSION_INFO VERSIONINFO - FILEVERSION 2,3,695,0 - PRODUCTVERSION 2,3,695,0 + FILEVERSION 2,3,696,0 + PRODUCTVERSION 2,3,696,0 FILEFLAGSMASK 0x3fL #ifdef _DEBUG FILEFLAGS 0x1L @@ -316,13 +316,13 @@ BEGIN BEGIN VALUE "CompanyName", "Akeo Consulting (http://akeo.ie)" VALUE "FileDescription", "Rufus" - VALUE "FileVersion", "2.3.695" + VALUE "FileVersion", "2.3.696" VALUE "InternalName", "Rufus" VALUE "LegalCopyright", "© 2011-2015 Pete Batard (GPL v3)" VALUE "LegalTrademarks", "http://www.gnu.org/copyleft/gpl.html" VALUE "OriginalFilename", "rufus.exe" VALUE "ProductName", "Rufus" - VALUE "ProductVersion", "2.3.695" + VALUE "ProductVersion", "2.3.696" END END BLOCK "VarFileInfo" diff --git a/src/syslinux/libfat/.msvc/libfat.vcxproj b/src/syslinux/libfat/.msvc/libfat.vcxproj index fca0aabd..64241db6 100644 --- a/src/syslinux/libfat/.msvc/libfat.vcxproj +++ b/src/syslinux/libfat/.msvc/libfat.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -41,27 +41,27 @@ StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 diff --git a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj b/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj index 9fcb1be6..e0ac17b6 100644 --- a/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj +++ b/src/syslinux/libinstaller/.msvc/libinstaller.vcxproj @@ -1,5 +1,5 @@  - + Debug @@ -43,27 +43,27 @@ StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 StaticLibrary true Unicode - v120 + v140 StaticLibrary false true Unicode - v120 + v140 diff --git a/src/vhd.c b/src/vhd.c index fe33cf84..2224a32b 100644 --- a/src/vhd.c +++ b/src/vhd.c @@ -444,8 +444,12 @@ static BOOL WimExtractFile_7z(const char* image, int index, const char* src, con char tmpdst[MAX_PATH]; uprintf("Opening: %s:[%d] (7-Zip)", image, index); + + if ((image == NULL) || (src == NULL) || (dst == NULL)) + return FALSE; + safe_strcpy(tmpdst, sizeof(tmpdst), dst); - for (i=safe_strlen(tmpdst); i>0; i--) { + for (i=strlen(tmpdst)-1; i>0; i--) { if (tmpdst[i] == '\\') break; } diff --git a/wdk_build.cmd b/wdk_build.cmd index 6beb863b..c51fe49f 100644 --- a/wdk_build.cmd +++ b/wdk_build.cmd @@ -3,7 +3,7 @@ if Test%BUILD_ALT_DIR%==Test goto usage ::# /M 2 for multiple cores -set BUILD_CMD=build -bcwgZ -M2 +set BUILD_CMD=build -bcwgZ -M12 set PWD=%~dp0 ::# Set target platform type