mirror of
https://github.com/veracrypt/VeraCrypt.git
synced 2025-11-11 02:58:02 -06:00
Static Code Analysis : Add check on the return of strtok inside mkfulldir_internal to avoid warning.
This commit is contained in:
@@ -73,6 +73,8 @@ mkfulldir_internal (char *path)
|
|||||||
trail[0] = tokpath[0];
|
trail[0] = tokpath[0];
|
||||||
trail[1] = tokpath[1];
|
trail[1] = tokpath[1];
|
||||||
trail[2] = '\0';
|
trail[2] = '\0';
|
||||||
|
if (token)
|
||||||
|
{
|
||||||
strcat (trail, token);
|
strcat (trail, token);
|
||||||
strcat (trail, "\\");
|
strcat (trail, "\\");
|
||||||
token = strtok (NULL, "\\/");
|
token = strtok (NULL, "\\/");
|
||||||
@@ -83,6 +85,7 @@ mkfulldir_internal (char *path)
|
|||||||
}
|
}
|
||||||
token = strtok (NULL, "\\/");
|
token = strtok (NULL, "\\/");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (tokpath[1] == ':')
|
if (tokpath[1] == ':')
|
||||||
{ /* drive letter */
|
{ /* drive letter */
|
||||||
|
|||||||
Reference in New Issue
Block a user