On 2020-08-08 18:09, Tom Lane wrote:
Peter Eisentraut writes:
I removed namecpy() altogether because you can just use struct assignment.
Makes sense, and I notice it was unused anyway.
v3 passes eyeball examination (I didn't bother running tests), with
only one remaining nit: the proposed co
Peter Eisentraut writes:
> I removed namecpy() altogether because you can just use struct assignment.
Makes sense, and I notice it was unused anyway.
v3 passes eyeball examination (I didn't bother running tests), with
only one remaining nit: the proposed commit message says
They are equ
265388a79269d2cf67cdfbe5a26a74f0f4a178 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut
Date: Tue, 4 Aug 2020 15:16:37 +0200
Subject: [PATCH v3] Replace remaining StrNCpy() by strlcpy()
They are equivalent, and strlcpy() has become the preferred spelling.
Convert over the remaining cases.
Remove StrN
On Tue, 4 Aug 2020 at 00:12, Tom Lane wrote:
>
> I wrote:
> > David Rowley writes:
> >> Will mean that we'll now no longer zero the full length of the m_xlog
> >> field after the end of the string. Won't that mean we'll start writing
> >> junk bytes to the stats collector?
>
> > StrNCpy doesn't z
Peter Eisentraut writes:
> Okay, here is a new patch with improved implementations of namecpy() and
> namestrcpy(). I didn't see any other places that relied on the
> zero-filling behavior of strncpy().
I've looked through this patch, and I concur with your conclusion that
noplace else is depe
ment, 24x7 Support, Remote DBA, Training & Services
From 740866001613e9d6aa29f759085ea284c0d41c94 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut
Date: Tue, 4 Aug 2020 15:16:37 +0200
Subject: [PATCH v2] Replace remaining StrNCpy() by strlcpy()
They are equivalent, and strlcpy() has become the pr
Peter Eisentraut writes:
> On 2020-08-03 14:12, Tom Lane wrote:
>> In the specific case of the stats collector, if you don't want
>> to be sending junk bytes then you'd better be memset'ing the
>> whole message buffer not just this string field. So I'm not
>> sure that the argument has any force
On 2020-08-03 14:12, Tom Lane wrote:
I wrote:
David Rowley writes:
Will mean that we'll now no longer zero the full length of the m_xlog
field after the end of the string. Won't that mean we'll start writing
junk bytes to the stats collector?
StrNCpy doesn't zero-fill the destination today
I wrote:
> David Rowley writes:
>> Will mean that we'll now no longer zero the full length of the m_xlog
>> field after the end of the string. Won't that mean we'll start writing
>> junk bytes to the stats collector?
> StrNCpy doesn't zero-fill the destination today either (except for
> the very
David Rowley writes:
> - StrNCpy(msg.m_xlog, xlog, sizeof(msg.m_xlog));
> + strlcpy(msg.m_xlog, xlog, sizeof(msg.m_xlog));
> Will mean that we'll now no longer zero the full length of the m_xlog
> field after the end of the string. Won't that mean we'll start writing
> junk bytes to the stats col
On Mon, 3 Aug 2020 at 18:59, Peter Eisentraut
wrote:
> I propose to replace the remaining uses of StrNCpy() with strlcpy() and
> remove the former. It's clear that strlcpy() has won the popularity
> contest, and the presence of the former is just confusing now.
It certainly would be good to get
24x7 Support, Remote DBA, Training & Services
From ae0540f02eedfcf7a2b31ea8570d6bd26b31ef19 Mon Sep 17 00:00:00 2001
From: Peter Eisentraut
Date: Mon, 3 Aug 2020 08:25:54 +0200
Subject: [PATCH] Replace remaining StrNCpy() by strlcpy()
They are equivalent, and strlcpy() has become the preferred
12 matches
Mail list logo