Hi Gilles,

On Sun, 30 Oct 2016 02:04:59 -0500
"Karl O. Pinc" <k...@meme.com> wrote:

> Attached is a patch to be applied on top of your v10 patch
> which does basic fixup to logfile_writename().

I'm looking at the v13 patch and don't see a change I submitted
with a patch to v10.  You wrote:

    snprintf(tempfn, sizeof(tempfn), "%s",
    strcat(tempfn, ".tmp");

I patched to:

    snprintf(tempfn, sizeof(tempfn), "%s.tmp",

As long as you're doing a snprintf() there's no point
in "risking" a buffer overflow by a subsequent strcat().
(Not that you're likely to ever get a buffer overflow.)
And why make two calls instead of 1?  That's what's
in my head.


Karl <k...@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein

Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:

Reply via email to