summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn Landden <shawn@git.icu>2021-07-15 05:41:11 +0400
committerGitHub <noreply@github.com>2021-07-15 05:41:11 +0400
commit21da64e45db5d229dbb02533274bef84702d65a1 (patch)
tree3070aa83a321b6c727806e5e7741eeeaed1f7a40
parent68a9d020737449a6bc6cb09cf7161caa47dc498d (diff)
parent879b71d6e95673e58d33f6c3c341a893ee307161 (diff)
downloaddistcc-git-21da64e45db5d229dbb02533274bef84702d65a1.tar.gz
Merge pull request #425 from asheplyakov/heapcorruption-fixup
dcc_gcc_rewrite_fqn: increase buffer size by one, hopefully avoiding heap corruption
-rw-r--r--src/compile.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/compile.c b/src/compile.c
index 3496456..26d7d18 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -584,7 +584,7 @@ static int dcc_gcc_rewrite_fqn(char **argv)
return -ENOENT;
- newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0] + 1);
+ newcmd_len = strlen(target_with_vendor) + 1 + strlen(argv[0]) + 1;
newcmd = malloc(newcmd_len);
if (!newcmd)
return -ENOMEM;