pgsql: Add missing string terminator

From: Daniel Gustafsson <dgustafsson(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Add missing string terminator
Date: 2025-04-30 09:36:04
Message-ID: E1uA3rI-000Ibx-19@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(at)gmail(dot)com>
Reviewed-by: Daniel Gustafsson <daniel(at)yesql(dot)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(+)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message David Rowley 2025-04-30 10:57:56 Re: pgsql: Add missing string terminator
Previous Message David Rowley 2025-04-30 07:29:05 pgsql: Fix broken indentation