From 5af98d3843eee0f16c6b0ecc1d8f3be73bbaa1e7 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Mon, 5 Aug 2013 02:39:25 +0200 Subject: [PATCH] test: replace strcpy() with strncpy() --- test/runner-unix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/runner-unix.c b/test/runner-unix.c index b66df51b..9afcd1e4 100644 --- a/test/runner-unix.c +++ b/test/runner-unix.c @@ -49,7 +49,7 @@ void platform_init(int argc, char **argv) { /* Disable stdio output buffering. */ setvbuf(stdout, NULL, _IONBF, 0); setvbuf(stderr, NULL, _IONBF, 0); - strcpy(executable_path, argv[0]); + strncpy(executable_path, argv[0], sizeof(executable_path) - 1); signal(SIGPIPE, SIG_IGN); }