[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size
From: |
Ray Donnelly |
Subject: |
Re: [PATCH] output.c: Fix memory stomp when need==fmtbuf.size |
Date: |
Mon, 27 Jan 2014 19:01:19 +0000 |
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 <address@hidden> wrote:
> On Sun, 2014-01-26 at 16:35 +0000, 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!
>