mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 19:08:26 -06:00
Static Code Analysis : Generalize the use of Safe String functions. Add some NULL pointer checks. Avoid false-positive detection in AppendMenu (MF_SEPARATOR) calls by setting the last parameter to "" instead of NULL.
This commit is contained in:
@@ -56,7 +56,7 @@ namespace VeraCrypt
|
||||
string volumeDevPath = favorite.Path;
|
||||
|
||||
wchar_t resolvedVolumeDevPath[TC_MAX_PATH];
|
||||
if (ResolveSymbolicLink (SingleStringToWide (volumeDevPath).c_str(), resolvedVolumeDevPath))
|
||||
if (ResolveSymbolicLink (SingleStringToWide (volumeDevPath).c_str(), resolvedVolumeDevPath, sizeof(resolvedVolumeDevPath)))
|
||||
volumeDevPath = WideToSingleString (resolvedVolumeDevPath);
|
||||
|
||||
char volumeName[TC_MAX_PATH];
|
||||
@@ -414,7 +414,7 @@ namespace VeraCrypt
|
||||
if (FavoriteVolumes.empty())
|
||||
return;
|
||||
|
||||
AppendMenu (FavoriteVolumesMenu, MF_SEPARATOR, 0, NULL);
|
||||
AppendMenu (FavoriteVolumesMenu, MF_SEPARATOR, 0, "");
|
||||
|
||||
int i = 0;
|
||||
foreach (const FavoriteVolume &favorite, FavoriteVolumes)
|
||||
|
||||
Reference in New Issue
Block a user