pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <akapila@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Use strlcpy instead of memcpy for copying the slot name in pgsta
Date: Fri, 06 Nov 2020 02:51:25 +0000
Message-ID: <E1karqX-0007m0-KQ@gemulon.postgresql.org> (raw)

Use strlcpy instead of memcpy for copying the slot name in pgstat.c.

There is no outright bug here but it is better to be consistent with the
usage at other places in the same file. In the passing, fix a wrong
assertion in pgstat_recv_replslot.

Author: Kyotaro Horiguchi
Reviewed-by: Sawada Masahiko and Amit Kapila
Discussion: https://postgr.es/m/20201104.175523.1704166915688949637.horikyota.ntt@gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4f841ce3f7f4d429a3a275f82745d63c78cde4b2

Modified Files
--------------
src/backend/postmaster/pgstat.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)



Message-ID: <E1karqX-0007m0-KQ@gemulon.postgresql.org>
Permalink:  ../E1karqX-0007m0-KQ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1karqX-0007m0-KQ@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: akapila@postgresql.org
  Subject: Re: pgsql: Use strlcpy instead of memcpy for copying the slot name in pgsta
  In-Reply-To: <E1karqX-0007m0-KQ@gemulon.postgresql.org>
  References: <E1karqX-0007m0-KQ@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox