mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-23 03:06:56 -04:00
[misc] fix PVS-Studio static analyzer warnings
* Surround macro params to ensure expected results * Fix copy-paste errors * Fix a potential buffer overflow in SetSectionHeaders() * Add const modifier where relevant * Use GetWindowLongPtr() everywhere * Use proper sprintf format for unsigned int * Use %s for printf-like funcs (https://www.viva64.com/en/w/v618/print/) * Closes #1464
This commit is contained in:
parent
e0bc2e5ffd
commit
121257c584
10 changed files with 27 additions and 27 deletions
|
@ -250,8 +250,8 @@ static void ToValidLabel(char* Label, BOOL bFAT)
|
|||
{
|
||||
size_t i, j, k;
|
||||
BOOL found;
|
||||
WCHAR unauthorized[] = L"*?,;:/\\|+=<>[]\"";
|
||||
WCHAR to_underscore[] = L"\t.";
|
||||
const WCHAR unauthorized[] = L"*?,;:/\\|+=<>[]\"";
|
||||
const WCHAR to_underscore[] = L"\t.";
|
||||
WCHAR *wLabel = utf8_to_wchar(Label);
|
||||
|
||||
if (wLabel == NULL)
|
||||
|
@ -1863,7 +1863,7 @@ DWORD WINAPI FormatThread(void* param)
|
|||
if (report.bb_count) {
|
||||
bb_msg = lmprintf(MSG_011, report.bb_count, report.num_read_errors, report.num_write_errors,
|
||||
report.num_corruption_errors);
|
||||
fprintf(log_fd, bb_msg);
|
||||
fprintf(log_fd, "%s", bb_msg);
|
||||
GetLocalTime(<);
|
||||
fprintf(log_fd, APPLICATION_NAME " bad blocks check ended on: %04d.%02d.%02d %02d:%02d:%02d",
|
||||
lt.wYear, lt.wMonth, lt.wDay, lt.wHour, lt.wMinute, lt.wSecond);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue