summaryrefslogtreecommitdiff
path: root/.local/bin
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@lukeshu.com>2017-06-20 21:26:02 -0400
committerLuke Shumaker <lukeshu@lukeshu.com>2017-06-20 21:26:02 -0400
commit74c72d7a7b11c2166410a2bf28bcb35e89097dff (patch)
tree41be4f966acbe19faeea7eab3f51f8a3df4e8486 /.local/bin
parent1541e70ad43873b63220b690242199eb0a5f68ef (diff)
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.
Diffstat (limited to '.local/bin')
-rw-r--r--.local/bin/autobuild.c2
1 files changed, 1 insertions, 1 deletions
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);