pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add missing string terminator
Date: Wed, 30 Apr 2025 09:36:04 +0000
Message-ID: <E1uA3rI-000Ibx-19@gemulon.postgresql.org> (raw)

Add missing string terminator

When copying the string strncpy won't add nul termination since
the string length is equal to the length specified.  Explicitly
set a nul terminator after copying to properly terminate. Found
via post-commit review.

Author: Rahila Syed <rahilasyed90@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAH2L28vt16C9xTuK+K7QZvtA3kCNWXOEiT=gEekUw3Xxp9LVQw@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d2a1ed1727a8ef45eab1a8ddb3d375c1ce839aac

Modified Files
--------------
src/backend/utils/mmgr/mcxt.c | 1 +
1 file changed, 1 insertion(+)



view thread (8+ messages)  latest in thread

Message-ID: <E1uA3rI-000Ibx-19@gemulon.postgresql.org>
Permalink:  ../E1uA3rI-000Ibx-19@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1uA3rI-000Ibx-19@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 using the --to and --cc options:
  reply via email

  To: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: Add missing string terminator
  In-Reply-To: <E1uA3rI-000Ibx-19@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