test: replace strcpy() with strncpy()

This commit is contained in:
Ben Noordhuis 2013-08-05 02:39:25 +02:00
parent 96f32a206b
commit 5af98d3843

View File

@ -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);
}