VeraCrypt
aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMounir IDRASSI <mounir.idrassi@idrix.fr>2014-07-14 15:16:39 (GMT)
committerMounir IDRASSI <mounir.idrassi@idrix.fr>2014-11-08 22:21:10 (GMT)
commit5c1db9d0e1287c873d180021cf82e89677fe4aa0 (patch)
tree09e785ec4ef1ee539974f08a1d15a96c35676476 /src
parentf3625a080f084dfef7d3bc0fb495c5d7614d9341 (diff)
downloadVeraCrypt-5c1db9d0e1287c873d180021cf82e89677fe4aa0.zip
VeraCrypt-5c1db9d0e1287c873d180021cf82e89677fe4aa0.tar.gz
Static Code Analysis : Add check on the return of strtok inside mkfulldir_internal to avoid warning.
Diffstat (limited to 'src')
-rw-r--r--src/Setup/Dir.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Setup/Dir.c b/src/Setup/Dir.c
index 7c418c7..a0380ef 100644
--- a/src/Setup/Dir.c
+++ b/src/Setup/Dir.c
@@ -73,15 +73,18 @@ mkfulldir_internal (char *path)
trail[0] = tokpath[0];
trail[1] = tokpath[1];
trail[2] = '\0';
- strcat (trail, token);
- strcat (trail, "\\");
- token = strtok (NULL, "\\/");
if (token)
- { /* get share name */
+ {
strcat (trail, token);
strcat (trail, "\\");
+ token = strtok (NULL, "\\/");
+ if (token)
+ { /* get share name */
+ strcat (trail, token);
+ strcat (trail, "\\");
+ }
+ token = strtok (NULL, "\\/");
}
- token = strtok (NULL, "\\/");
}
if (tokpath[1] == ':')