From 74c72d7a7b11c2166410a2bf28bcb35e89097dff Mon Sep 17 00:00:00 2001 From: Luke Shumaker Date: Tue, 20 Jun 2017 21:26:02 -0400 Subject: autobuild.c: Fix an overwrite-by-1 bug It hasn't ever caused any issues, and it wasn't based on user-supplied input, so not a huge issue. --- .local/bin/autobuild.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.local/bin/autobuild.c b/.local/bin/autobuild.c index 3805e19..48ff48d 100644 --- a/.local/bin/autobuild.c +++ b/.local/bin/autobuild.c @@ -64,7 +64,7 @@ main(int argc, char **argv) mysetenv("LC_TIME" , env_lc_time ); const char *script_suffix = "/.local/bin/autobuild.sh"; - char *script = alloca(strlen(user->pw_dir)+strlen(script_suffix)); + char *script = alloca(strlen(user->pw_dir)+strlen(script_suffix)+1); strcpy(script, user->pw_dir); strcpy(&(script[strlen(user->pw_dir)]), script_suffix); -- cgit v1.2.2