mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-25 04:04:26 -04:00
[cmp] update Bled to latest
* Also fix a possible buffer overflow in msapi_utf8.h
This commit is contained in:
parent
ff9eae4e6d
commit
67081fac6e
7 changed files with 21 additions and 20 deletions
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Bled (Busybox Library for Easy Decompression)
|
* Bled (Base Library for Easy Decompression)
|
||||||
*
|
*
|
||||||
* Copyright © 2014-2015 Pete Batard <pete@akeo.ie>
|
* Copyright © 2014-2015 Pete Batard <pete@akeo.ie>
|
||||||
*
|
*
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Bled (Busybox Library for Easy Decompression)
|
* Bled (Base Library for Easy Decompression)
|
||||||
*
|
*
|
||||||
* Copyright © 2014-2015 Pete Batard <pete@akeo.ie>
|
* Copyright © 2014-2015 Pete Batard <pete@akeo.ie>
|
||||||
*
|
*
|
||||||
|
|
|
@ -52,7 +52,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
/* Proceed with deleting */
|
/* Proceed with deleting */
|
||||||
if (unlink(file_header->name) == -1
|
if (_unlink(file_header->name) == -1
|
||||||
&& errno != ENOENT
|
&& errno != ENOENT
|
||||||
) {
|
) {
|
||||||
bb_perror_msg_and_die("can't remove old file %s",
|
bb_perror_msg_and_die("can't remove old file %s",
|
||||||
|
@ -78,7 +78,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||||
data_skip(archive_handle);
|
data_skip(archive_handle);
|
||||||
goto ret;
|
goto ret;
|
||||||
}
|
}
|
||||||
else if ((unlink(file_header->name) == -1) && (errno != EISDIR)) {
|
else if ((_unlink(file_header->name) == -1) && (errno != EISDIR)) {
|
||||||
bb_perror_msg_and_die("can't remove old file %s",
|
bb_perror_msg_and_die("can't remove old file %s",
|
||||||
file_header->name);
|
file_header->name);
|
||||||
}
|
}
|
||||||
|
@ -116,12 +116,11 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||||
/* rpm-style temp file name */
|
/* rpm-style temp file name */
|
||||||
dst_name = xasprintf("%s;%x", dst_name, (int)getpid());
|
dst_name = xasprintf("%s;%x", dst_name, (int)getpid());
|
||||||
#endif
|
#endif
|
||||||
dst_fd = open(dst_name, flags, file_header->mode);
|
if (_sopen_s(&dst_fd, dst_name, flags, _SH_DENYNO, file_header->mode) != 0) {
|
||||||
if (dst_fd < 0) {
|
|
||||||
bb_perror_msg_and_die("can't open file %s", dst_name);
|
bb_perror_msg_and_die("can't open file %s", dst_name);
|
||||||
}
|
}
|
||||||
bb_copyfd_exact_size(archive_handle->src_fd, dst_fd, file_header->size);
|
bb_copyfd_exact_size(archive_handle->src_fd, dst_fd, file_header->size);
|
||||||
close(dst_fd);
|
_close(dst_fd);
|
||||||
#ifdef ARCHIVE_REPLACE_VIA_RENAME
|
#ifdef ARCHIVE_REPLACE_VIA_RENAME
|
||||||
if (archive_handle->ah_flags & ARCHIVE_REPLACE_VIA_RENAME) {
|
if (archive_handle->ah_flags & ARCHIVE_REPLACE_VIA_RENAME) {
|
||||||
xrename(dst_name, file_header->name);
|
xrename(dst_name, file_header->name);
|
||||||
|
@ -192,7 +191,7 @@ void FAST_FUNC data_extract_all(archive_handle_t *archive_handle)
|
||||||
* it has lchmod which seems to do nothing!
|
* it has lchmod which seems to do nothing!
|
||||||
* so we use chmod... */
|
* so we use chmod... */
|
||||||
if (!(archive_handle->ah_flags & ARCHIVE_DONT_RESTORE_PERM)) {
|
if (!(archive_handle->ah_flags & ARCHIVE_DONT_RESTORE_PERM)) {
|
||||||
(void)chmod(file_header->name, file_header->mode);
|
(void)_chmod(file_header->name, file_header->mode);
|
||||||
}
|
}
|
||||||
if (archive_handle->ah_flags & ARCHIVE_RESTORE_DATE) {
|
if (archive_handle->ah_flags & ARCHIVE_RESTORE_DATE) {
|
||||||
struct timeval t[2];
|
struct timeval t[2];
|
||||||
|
|
|
@ -919,6 +919,7 @@ static int inflate_block(STATE_PARAM smallint *e)
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
abort_unzip(PASS_STATE_ONLY);
|
abort_unzip(PASS_STATE_ONLY);
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/*
|
/*
|
||||||
* Library header for busybox
|
* Library header for busybox/Bled
|
||||||
*
|
*
|
||||||
* Rewritten for Bled (Busybox Library for Easy Decompression)
|
* Rewritten for Bled (Base Library for Easy Decompression)
|
||||||
* Copyright © 2014-2015 Pete Batard <pete@akeo.ie>
|
* Copyright © 2014-2015 Pete Batard <pete@akeo.ie>
|
||||||
*
|
*
|
||||||
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
* Licensed under GPLv2 or later, see file LICENSE in this source tree.
|
||||||
|
@ -20,9 +20,6 @@
|
||||||
#error Only Windows platforms are supported
|
#error Only Windows platforms are supported
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#pragma warning(disable: 4715) // not all control paths return a value
|
|
||||||
#pragma warning(disable: 4996) // Ignore deprecated
|
|
||||||
#if defined(DDKBUILD)
|
#if defined(DDKBUILD)
|
||||||
#pragma warning(disable: 4242) // "Conversion from x to y, possible loss of data"
|
#pragma warning(disable: 4242) // "Conversion from x to y, possible loss of data"
|
||||||
#pragma warning(disable: 4244)
|
#pragma warning(disable: 4244)
|
||||||
|
@ -31,7 +28,6 @@ struct timeval {
|
||||||
long tv_usec;
|
long tv_usec;
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "platform.h"
|
#include "platform.h"
|
||||||
#include "msapi_utf8.h"
|
#include "msapi_utf8.h"
|
||||||
|
@ -197,7 +193,12 @@ static inline int full_read(int fd, void *buf, size_t count) {
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline struct tm *localtime_r(const time_t *timep, struct tm *result) {
|
static inline struct tm *localtime_r(const time_t *timep, struct tm *result) {
|
||||||
|
#if defined(DDKBUILD)
|
||||||
result = localtime(timep);
|
result = localtime(timep);
|
||||||
|
#else
|
||||||
|
if (localtime_s(result, timep) != 0)
|
||||||
|
result = NULL;
|
||||||
|
#endif
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -802,7 +802,7 @@ static __inline char* getenvU(const char* varname)
|
||||||
wchar_t value[256];
|
wchar_t value[256];
|
||||||
size_t value_size;
|
size_t value_size;
|
||||||
// MinGW and WDK don't know wdupenv_s, so we use wgetenv_s
|
// MinGW and WDK don't know wdupenv_s, so we use wgetenv_s
|
||||||
_wgetenv_s(&value_size, value, sizeof(value), wvarname);
|
_wgetenv_s(&value_size, value, ARRAYSIZE(value), wvarname);
|
||||||
ret = wchar_to_utf8(value);
|
ret = wchar_to_utf8(value);
|
||||||
wfree(varname);
|
wfree(varname);
|
||||||
return ret;
|
return ret;
|
||||||
|
|
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.4.724"
|
CAPTION "Rufus 2.4.725"
|
||||||
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
|
||||||
|
@ -317,8 +317,8 @@ END
|
||||||
//
|
//
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION 2,4,724,0
|
FILEVERSION 2,4,725,0
|
||||||
PRODUCTVERSION 2,4,724,0
|
PRODUCTVERSION 2,4,725,0
|
||||||
FILEFLAGSMASK 0x3fL
|
FILEFLAGSMASK 0x3fL
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
FILEFLAGS 0x1L
|
FILEFLAGS 0x1L
|
||||||
|
@ -335,13 +335,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.4.724"
|
VALUE "FileVersion", "2.4.725"
|
||||||
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.4.724"
|
VALUE "ProductVersion", "2.4.725"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue