Description: fix off-by-paren in dcc_gcc_rewrite_fqn buffer sizing src/compile.c's dcc_gcc_rewrite_fqn() allocates a buffer for "-\0" but writes strlen(argv[0] + 1) — pointer arithmetic *then* strlen, which under-allocates by 2 bytes and trips glibc FORTIFY_SOURCE=2 with "*** buffer overflow detected ***" on any `distcc gcc …` invocation. Intent was strlen(argv[0]) + 1 (length plus terminator). Bug-reauktion: marfrit/marfrit-packages#3 Author: Markus Fritsche --- a/src/compile.c +++ b/src/compile.c @@ -579,7 +579,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;