mirror of
https://github.com/pbatard/rufus.git
synced 2025-05-31 06:48:26 -04:00
[misc] fix PVS-Studio warnings
This commit is contained in:
parent
eeca1f279c
commit
c28f9bc491
26 changed files with 98 additions and 81 deletions
|
@ -821,7 +821,7 @@ static __inline int SHDeleteDirectoryExU(HWND hwnd, const char* pszPath, FILEOP_
|
|||
int ret;
|
||||
// String needs to be double NULL terminated, so we just use the length of the UTF-8 string
|
||||
// which is always expected to be larger than our UTF-16 one, and add 2 chars for good measure.
|
||||
size_t wpszPath_len = strlen(pszPath) + 2;
|
||||
size_t wpszPath_len = (pszPath == NULL) ? 0 : strlen(pszPath) + 2;
|
||||
// coverity[returned_null]
|
||||
walloc(pszPath, wpszPath_len);
|
||||
SHFILEOPSTRUCTW shfo = { hwnd, FO_DELETE, wpszPath, NULL, fFlags, FALSE, NULL, NULL };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue