1
0
mirror of https://github.com/veracrypt/VeraCrypt.git synced 2025-11-11 19:08:26 -06:00

Windows: Add various checks to address Coverity reported issues.

This commit is contained in:
Mounir IDRASSI
2022-03-26 20:03:19 +01:00
parent a0809fe85c
commit 762065917f
11 changed files with 105 additions and 28 deletions

View File

@@ -611,7 +611,8 @@ char *GetPreferredLangId ()
void SetPreferredLangId (char *langId)
{
StringCbCopyA (PreferredLangId, sizeof(PreferredLangId), langId);
if (strlen(langId) < sizeof(PreferredLangId))
StringCbCopyA (PreferredLangId, sizeof(PreferredLangId), langId);
}