pgsql: Avoid unnecessary copying of a string in pg_restore.c

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid unnecessary copying of a string in pg_restore.c
Date: 2025-04-06 13:33:01
Message-ID: E1u1Q7R-002xyY-1Q@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Avoid unnecessary copying of a string in pg_restore.c

Coverity complained about a possible overrun in the copy, but there is
no actual need to copy the string at all.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/5e1915439085014140314979c4dd5e23bd677cac

Modified Files
--------------
src/bin/pg_dump/pg_restore.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2025-04-06 15:37:16 pgsql: Use "(void)" to mark pgstat_lock_entry(..., false) calls.
Previous Message Andrew Dunstan 2025-04-06 13:09:44 pgsql: Fix a couple of memory leaks in pg_restore.c