mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
libDtSearch: Coverity 86698
This commit is contained in:
parent
3fe9d94879
commit
68986baef8
1 changed files with 1 additions and 1 deletions
|
@ -294,7 +294,7 @@ char *path_str /* Path to remove filename from */
|
|||
/* There is only a filename if string does not contain a DIRCHAR or
|
||||
':' which separates drive spec from path. */
|
||||
if (path_str == NULL) return (NULL);
|
||||
strcpy(dirpath,path_str); /* Copy into output string */
|
||||
snprintf(dirpath, sizeof(dirpath), "%s", path_str); /* Copy into output string */
|
||||
if ((path_str = strrchr(dirpath,DIRCHAR)) == NULL)
|
||||
if ((path_str = strrchr(dirpath,':')) == NULL) return (NULL);
|
||||
path_str[1] = '\0'; /* Truncate string */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue