summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/bin/embryo/embryo_cc_sc2.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c
index 90e177c16a..0b72ee312a 100644
--- a/src/bin/embryo/embryo_cc_sc2.c
+++ b/src/bin/embryo/embryo_cc_sc2.c
@@ -146,10 +146,8 @@ plungefile(char *name, int try_currentpath, int try_includepaths)
146 { 146 {
147 char path[PATH_MAX]; 147 char path[PATH_MAX];
148 148
149 strncpy(path, ptr, sizeof path); 149 snprintf(path, sizeof (path), "%s/%s", ptr, name);
150 path[sizeof path - 1] = '\0'; /* force '\0' termination */ 150 path[sizeof path - 1] = '\0'; /* force '\0' termination */
151 strncat(path, name, sizeof(path) - strlen(path) - 1);
152 path[sizeof path - 1] = '\0';
153 result = plungequalifiedfile(path); 151 result = plungequalifiedfile(path);
154 } /* while */ 152 } /* while */
155 } /* if */ 153 } /* if */