diff --git a/src/common_controls_and_elevation.manifest b/src/common_controls_and_elevation.manifest
index 1682c903..b7bfd26d 100644
--- a/src/common_controls_and_elevation.manifest
+++ b/src/common_controls_and_elevation.manifest
@@ -21,7 +21,7 @@
diff --git a/src/parser.c b/src/parser.c
index c7e8c320..8d85afc5 100644
--- a/src/parser.c
+++ b/src/parser.c
@@ -90,7 +90,7 @@ static wchar_t* get_token_data_line(const wchar_t* wtoken, wchar_t* wline)
return (wline[r] == 0)?NULL:&wline[r];
}
-// Parse a file (ANSI or UTF-8 or UTF-16) and return the data for the first occurrence of 'token'
+// Parse a file (ANSI or UTF-8 or UTF-16) and return the data for the first occurrence of 'token'
// The returned string is UTF-8 and MUST be freed by the caller
char* get_token_data_file(const char* token, const char* filename)
{
@@ -135,7 +135,7 @@ out:
return ret;
}
-// Parse a buffer (ANSI or UTF-8) and return the data for the 'n'th occurrence of 'token'
+// Parse a buffer (ANSI or UTF-8) and return the data for the 'n'th occurrence of 'token'
// The returned string is UTF-8 and MUST be freed by the caller
char* get_token_data_buffer(const char* token, unsigned int n, const char* buffer, size_t buffer_size)
{
@@ -345,7 +345,7 @@ out:
if (fd_in != NULL) fclose(fd_in);
if (fd_out != NULL) fclose(fd_out);
- // If an insertion occurred, delete existing file and use the new one
+ // If an insertion occurred, delete existing file and use the new one
if (ret != NULL) {
// We're in Windows text mode => Remove CRs if requested
fd_in = _wfopen(wtmpname, L"rb");
@@ -375,10 +375,10 @@ out:
return ret;
}
-// Search for a specific 'src' substring data for all occurrences of 'token', and replace
+// Search for a specific 'src' substring data for all occurrences of 'token', and replace
// it with 'rep'. File can be ANSI or UNICODE and is overwritten. Parameters are UTF-8.
// The parsed line is of the form: [ ]token[ ]data
-// Returns a pointer to rep if replacement occurred, NULL otherwise
+// Returns a pointer to rep if replacement occurred, NULL otherwise
char* replace_in_token_data(const char* filename, const char* token, const char* src, const char* rep, BOOL dos2unix)
{
const wchar_t* outmode[] = { L"w", L"w, ccs=UTF-8", L"w, ccs=UTF-16LE" };
@@ -491,7 +491,7 @@ out:
if (fd_in != NULL) fclose(fd_in);
if (fd_out != NULL) fclose(fd_out);
- // If a replacement occurred, delete existing file and use the new one
+ // If a replacement occurred, delete existing file and use the new one
if (ret != NULL) {
// We're in Windows text mode => Remove CRs if requested
fd_in = _wfopen(wtmpname, L"rb");
diff --git a/src/rufus.c b/src/rufus.c
index 91b0b76d..e61b6d32 100644
--- a/src/rufus.c
+++ b/src/rufus.c
@@ -892,8 +892,9 @@ BOOL CALLBACK LogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
return TRUE;
case IDC_LOG_SAVE:
log_size = GetWindowTextLengthU(hLog);
- if (log_size > 0)
- log_buffer = (char*)malloc(log_size);
+ if (log_size <= 0)
+ break;
+ log_buffer = (char*)malloc(log_size);
if (log_buffer != NULL) {
log_size = GetDlgItemTextU(hDlg, IDC_LOG_EDIT, log_buffer, log_size);
if (log_size != 0) {
@@ -905,8 +906,6 @@ BOOL CALLBACK LogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
safe_free(filepath);
}
safe_free(log_buffer);
- } else {
- uprintf("Could not allocate buffer to save log\n");
}
break;
}
@@ -1027,11 +1026,11 @@ DWORD WINAPI ISOScanThread(LPVOID param)
safe_free(iso_path);
goto out;
}
- uprintf("ISO label: '%s'\r\n Size: %lld bytes\r\n Has a >4GB file: %s\r\n Uses EFI: %s%s\r\n Uses Bootmgr: %s\r\n Uses WinPE: %s%s\r\n Uses isolinux: %s (v%s)\n",
+ uprintf("ISO label: '%s'\r\n Size: %lld bytes\r\n Has a >4GB file: %s\r\n Uses EFI: %s%s\r\n Uses Bootmgr: %s\r\n Uses WinPE: %s%s\r\n Uses isolinux: %s %s\n",
iso_report.label, iso_report.projected_size, iso_report.has_4GB_file?"Yes":"No", (iso_report.has_efi || iso_report.has_win7_efi)?"Yes":"No",
(iso_report.has_win7_efi && (!iso_report.has_efi))?" (win7_x64)":"", iso_report.has_bootmgr?"Yes":"No",
IS_WINPE(iso_report.winpe)?"Yes":"No", (iso_report.uses_minint)?" (with /minint)":"", iso_report.has_isolinux?"Yes":"No",
- iso_report.has_syslinux_v5?"5.0 or later":"4.x or earlier");
+ iso_report.has_syslinux_v5?"(v5.0 or later)":iso_report.has_isolinux?"(v4.x or earlier)":"");
if (iso_report.has_isolinux && !iso_report.has_syslinux_v5) {
for (i=0; i