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:
c8233c9
)
libDtSearch: Coverity 86856
author
Peter Howkins
<flibble@users.sf.net>
Mon, 2 Jul 2018 22:01:54 +0000
(23:01 +0100)
committer
Peter Howkins
<flibble@users.sf.net>
Mon, 2 Jul 2018 22:01:54 +0000
(23:01 +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 3e8743fdc95122816dabb65f4c3f819e1cb4c021..d1b3d6f441cf9ba2ec40acbdb6ec8beb2c3e48d4 100644
(file)
--- a/
cde/lib/DtSearch/raima/pathfcns.c
+++ b/
cde/lib/DtSearch/raima/pathfcns.c
@@
-182,8
+182,7
@@
char *dbfpath /* one element from DBFPATH, or NULL for no path */
}
if (strlen(path_str) + strlen(dbfpath) >= FILENMLEN)
return (db_status = S_NAMELEN);
- strcpy(filespec,dbfpath);
- strcat(filespec,remdrv(path_str));
+ snprintf(filespec, sizeof(filespec), "%s%s", dbfpath, remdrv(path_str));
strcpy(path_str,filespec);
return (db_status = S_OKAY);