From 290d1c0534c1bb2b29341aae1694b9587cd76483 Mon Sep 17 00:00:00 2001 From: Jeff Squyres Date: Wed, 17 Oct 2018 08:57:30 -0700 Subject: [PATCH] opal/os_path: fix minor string overrun This is a follow on to 54ca3310ea35b7dc857afc59e00ffbb8f57e15ec to fix a minor bug identified by Coverity. Signed-off-by: Jeff Squyres --- opal/util/os_path.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opal/util/os_path.c b/opal/util/os_path.c index 5a29e9767c..8eb54f43f7 100644 --- a/opal/util/os_path.c +++ b/opal/util/os_path.c @@ -59,7 +59,7 @@ char *opal_os_path(int relative, ...) if (relative) { path[0] = '.'; } - strncat(path, path_sep, len); + strncat(path, path_sep, len - 1); return(path); }