Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size

2014-02-04 Thread Paul Smith
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

Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size

2014-02-02 Thread Paul Smith
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

Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size

2014-01-27 Thread Paul Smith
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.

Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size

2014-01-27 Thread Ray Donnelly
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

[PATCH] output.c: Fix memory stomp when need==fmtbuf.size

2014-01-26 Thread Ray Donnelly
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.