diff options
author | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-07-14 17:16:39 +0200 |
---|---|---|
committer | Mounir IDRASSI <mounir.idrassi@idrix.fr> | 2014-11-08 23:21:10 +0100 |
commit | 5c1db9d0e1287c873d180021cf82e89677fe4aa0 (patch) | |
tree | 09e785ec4ef1ee539974f08a1d15a96c35676476 | |
parent | f3625a080f084dfef7d3bc0fb495c5d7614d9341 (diff) | |
download | VeraCrypt-5c1db9d0e1287c873d180021cf82e89677fe4aa0.tar.gz VeraCrypt-5c1db9d0e1287c873d180021cf82e89677fe4aa0.zip |
Static Code Analysis : Add check on the return of strtok inside mkfulldir_internal to avoid warning.
-rw-r--r-- | src/Setup/Dir.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/Setup/Dir.c b/src/Setup/Dir.c index 7c418c74..a0380ef2 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] == ':')
|