Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
On Tue, 2014-02-04 at 10:33 +, Ray Donnelly wrote: > I can't see it in the git repository yet. > > .. am I being too impatient? > Sorry, it's committed in my local repo at home but I haven't pushed. I'll do that tonight. ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
I can't see it in the git repository yet. .. am I being too impatient? On Feb 2, 2014 4:00 PM, "Paul Smith" wrote: > On Sun, 2014-01-26 at 16:35 +, Ray Donnelly wrote: > > I missed a few assert cases in the previous patch. Please find a fixed > > version attached. > > I applied this change. Thanks! > > ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
On Sun, 2014-01-26 at 16:35 +, Ray Donnelly wrote: > I missed a few assert cases in the previous patch. Please find a fixed > version attached. I applied this change. Thanks! ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
No problem Paul, thanks for replying. I could've made it less intrusive by changing the test for whether to reallocate to: /* Make sure we have room. */ if (need >= fmtbuf.size) .. instead (so just a single '=' character change) but when I see "assert (fmtbuf.buffer[len] == '\0');" it doesn't sit well with me (looks like a bug at first glance) so I thought it better change it the way I did. Feel free to ask that I change to '>=', or just make that change yourself (provided you agree with my analysis that is). Cheers, Ray. On Mon, Jan 27, 2014 at 5:29 PM, Paul Smith wrote: > On Sun, 2014-01-26 at 16:35 +, Ray Donnelly wrote: >> I missed a few assert cases in the previous patch. Please find a fixed >> version attached. > > Thanks Ray; I'm utterly swamped for the last week or so with "real life" > but I should have a bit more free time later this week; I'll check out > your fix. > > Cheers! > ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
On Sun, 2014-01-26 at 16:35 +, Ray Donnelly wrote: > I missed a few assert cases in the previous patch. Please find a fixed > version attached. Thanks Ray; I'm utterly swamped for the last week or so with "real life" but I should have a bit more free time later this week; I'll check out your fix. Cheers! ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
I missed a few assert cases in the previous patch. Please find a fixed version attached. 0001-output.c-Fix-memory-stomp-when-need-fmtbuf.size.patch Description: Binary data ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make
[PATCH] output.c: Fix memory stomp when need==fmtbuf.size
Hi, Git commit 757849cd introduced a memory stomp in get_buffer() in output.c. If "need" is is equal to "fmtbuf.size" then: fmtbuf.buffer[need] = '\0'; .. writes '\0' to a byte 1 beyond the size of the allocated buffer. Please find attached a patch which fixes this. Best regards, Ray Donnelly. 0001-output.c-Fix-memory-stomp-when-need-fmtbuf.size.patch Description: Binary data ___ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make