From 8d2b64ed3b1a0f5f03ec69257eb68258121e4730 Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Sun, 20 Jan 2013 14:25:11 +0000 Subject: [PATCH] fix bug spotted by clang SVN revision: 83016 --- src/bin/embryo/embryo_cc_sc2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/embryo/embryo_cc_sc2.c b/src/bin/embryo/embryo_cc_sc2.c index 5f93b19548..90e177c16a 100644 --- a/src/bin/embryo/embryo_cc_sc2.c +++ b/src/bin/embryo/embryo_cc_sc2.c @@ -148,7 +148,7 @@ plungefile(char *name, int try_currentpath, int try_includepaths) strncpy(path, ptr, sizeof path); path[sizeof path - 1] = '\0'; /* force '\0' termination */ - strncat(path, name, sizeof(path) - strlen(path)); + strncat(path, name, sizeof(path) - strlen(path) - 1); path[sizeof path - 1] = '\0'; result = plungequalifiedfile(path); } /* while */