projects
/
oweals
/
cde.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3fe9d94
)
libDtSearch: Coverity 86698
author
Peter Howkins
<flibble@users.sf.net>
Mon, 2 Jul 2018 21:48:20 +0000
(22:48 +0100)
committer
Peter Howkins
<flibble@users.sf.net>
Mon, 2 Jul 2018 21:48:20 +0000
(22:48 +0100)
cde/lib/DtSearch/raima/pathfcns.c
patch
|
blob
|
history
diff --git
a/cde/lib/DtSearch/raima/pathfcns.c
b/cde/lib/DtSearch/raima/pathfcns.c
index 18c5943b478f8a43c75108bf4d1bd6dc619e4d55..75a2dd780891125d41ff19a1f4b8359a062f3dcb 100644
(file)
--- a/
cde/lib/DtSearch/raima/pathfcns.c
+++ b/
cde/lib/DtSearch/raima/pathfcns.c
@@
-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);
- s
trcpy(dirpath,path_str);
/* Copy into output string */
+ s
nprintf(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 */