[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
output.c assertion failed: child_error msg len computation
From: |
Dale Stimson |
Subject: |
output.c assertion failed: child_error msg len computation |
Date: |
Wed, 6 Apr 2016 13:28:04 -0700 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Using make 4.1.90 from the gnu git repoository with current HEAD commit ==
5bd7ad2b225bf9229ca96ba63b90f8094a2becde, the following diagnostic message
was received.
make: output.c:667: error: Assertion `fmtbuf.buffer[len-1] == '\0'' failed.
Investigation showed that in job.c, function child_error, the length of
string "nm" was not being included in the computed length value stored in
"l". This resulted in the buffer overflow found by the assertion.
I suggest the patch below. I have tested this and it works for me.
----------------------------------------------------------------
diff --git a/job.c b/job.c
index 62e2e56..40b7b0a 100644
--- a/job.c
+++ b/job.c
@@ -503,6 +503,7 @@ child_error (struct child *child,
sprintf (a, "%s:%lu", flocp->filenm, flocp->lineno);
nm = a;
}
+ l += strlen (nm);
OUTPUT_SET (&child->output);
----------------------------------------------------------------
- output.c assertion failed: child_error msg len computation,
Dale Stimson <=