-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[misc] fix and silence some Coverity warnings
- Loading branch information
Showing
10 changed files
with
30 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ msgstr "" | |
"Project-Id-Version: 4.5\n" | ||
"Report-Msgid-Bugs-To: [email protected]\n" | ||
"POT-Creation-Date: 2024-04-29 19:24+0300\n" | ||
"PO-Revision-Date: 2024-04-29 20:25+0330\n" | ||
"PO-Revision-Date: 2025-02-13 12:00+0000\n" | ||
"Last-Translator: MasterVito <[email protected]>\n" | ||
"Language-Team: \n" | ||
"Language: fa_IR\n" | ||
|
@@ -13,7 +13,7 @@ msgstr "" | |
"X-Poedit-SourceCharset: UTF-8\n" | ||
"X-Rufus-LanguageName: Persian (پارسی)\n" | ||
"X-Rufus-LCID: 0x0429\n" | ||
"X-Generator: Poedit 3.4.2\n" | ||
"X-Generator: Poedit 3.5\n" | ||
|
||
#. • IDD_DIALOG → IDS_DRIVE_PROPERTIES_TXT | ||
msgid "Drive Properties" | ||
|
@@ -1094,7 +1094,7 @@ msgstr "نسخه %d.%d (Build %d)" | |
|
||
#. • MSG_176 | ||
msgid "English translation: Pete Batard <mailto:[email protected]>" | ||
msgstr "ترجمه فارسی:\\line •سید عرفان <mailto:[email protected]>\\line •ضیاءالدین عظیمی <mailto:[email protected]>" | ||
msgstr "ترجمه فارسی:\\line •مستر ویتو <mailto:[email protected]>\\line •ضیاءالدین عظیمی <mailto:[email protected]>" | ||
|
||
#. • MSG_177 | ||
msgid "Report bugs or request enhancements at:" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10049,7 +10049,7 @@ t MSG_172 "امضای فایل دانلود شده معتبر نیست" | |
t MSG_173 "برای انتخاب کلیک کنید..." | ||
t MSG_174 "Rufus، ابزاری کاربردی و قابلاطمینان برای فرمت کردن درایوهای USB" | ||
t MSG_175 "نسخه %d.%d (Build %d)" | ||
t MSG_176 "ترجمه فارسی:\\line •سید عرفان <mailto:[email protected]>\\line •ضیاءالدین عظیمی <mailto:[email protected]>" | ||
t MSG_176 "ترجمه فارسی:\\line •مستر ویتو <mailto:[email protected]>\\line •ضیاءالدین عظیمی <mailto:[email protected]>" | ||
t MSG_177 "گزارش اشکال (Bug) یا درخواست قابلیت جدید و بهبود نرمافزار در:" | ||
t MSG_178 "حقوق نشر دیگران:" | ||
t MSG_179 "سیاست بهروزرسانی:" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ | |
* | ||
* See also: https://utf8everywhere.org | ||
* | ||
* Copyright © 2010-2023 Pete Batard <[email protected]> | ||
* Copyright © 2010-2025 Pete Batard <[email protected]> | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
|
@@ -174,14 +174,24 @@ static __inline DWORD FormatMessageU(DWORD dwFlags, LPCVOID lpSource, DWORD dwMe | |
DWORD dwLanguageId, char* lpBuffer, DWORD nSize, va_list *Arguments) | ||
{ | ||
DWORD ret = 0, err = ERROR_INVALID_DATA; | ||
// coverity[returned_null] | ||
// Exclude support for the FORMAT_MESSAGE_ALLOCATE_BUFFER special case. | ||
if (dwFlags & FORMAT_MESSAGE_ALLOCATE_BUFFER) { | ||
SetLastError(ERROR_INVALID_PARAMETER); | ||
return 0; | ||
} | ||
walloc(lpBuffer, nSize); | ||
if (wlpBuffer == NULL) { | ||
SetLastError(ERROR_NOT_ENOUGH_MEMORY); | ||
return 0; | ||
} | ||
ret = FormatMessageW(dwFlags, lpSource, dwMessageId, dwLanguageId, wlpBuffer, nSize, Arguments); | ||
err = GetLastError(); | ||
if ((ret != 0) && ((ret = wchar_to_utf8_no_alloc(wlpBuffer, lpBuffer, nSize)) == 0)) { | ||
err = GetLastError(); | ||
ret = 0; | ||
} | ||
// Coverity doesn't realise that we filtered out the FORMAT_MESSAGE_ALLOCATE_BUFFER case | ||
// coverity[leaked_storage] | ||
wfree(lpBuffer); | ||
SetLastError(err); | ||
return ret; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
/* | ||
* Rufus: The Reliable USB Formatting Utility | ||
* Elementary Unicode compliant find/replace parser | ||
* Copyright © 2012-2024 Pete Batard <[email protected]> | ||
* Copyright © 2012-2025 Pete Batard <[email protected]> | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
|
@@ -55,7 +55,7 @@ static loc_cmd* get_loc_cmd(char c, char* line) { | |
char *endptr, *expected_endptr, *token; | ||
loc_cmd* lcmd = NULL; | ||
|
||
for (j=0; j<ARRAYSIZE(parse_cmd); j++) { | ||
for (j = 0; j<ARRAYSIZE(parse_cmd); j++) { | ||
if (c == parse_cmd[j].c) | ||
break; | ||
} | ||
|
@@ -133,10 +133,11 @@ static loc_cmd* get_loc_cmd(char c, char* line) { | |
case 'u': // comma or dot separated list of unsigned integers (to end of line) | ||
// count the number of commas | ||
lcmd->unum_size = 1; | ||
for (l=i; line[l] != 0; l++) { | ||
for (l = i; line[l] != 0; l++) { | ||
if ((line[l] == '.') || (line[l] == ',')) | ||
lcmd->unum_size++; | ||
} | ||
free(lcmd->unum); | ||
lcmd->unum = (uint32_t*)malloc(lcmd->unum_size * sizeof(uint32_t)); | ||
if (lcmd->unum == NULL) { | ||
luprint("could not allocate memory"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters