Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9c87ed1

Browse files
committed
fix database name string copy
1 parent 5afaba9 commit 9c87ed1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pg_pageprep.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -674,7 +674,7 @@ start_bgworker_dynamic(const char *dbname, Oid relid, bool wait)
674674
worker_args->async = !wait;
675675

676676
/* Initialize worker struct */
677-
memcpy(buf, dbname, sizeof(buf));
677+
StrNCpy(buf, dbname, sizeof(buf));
678678
snprintf(worker.bgw_name, BGW_MAXLEN,
679679
"pg_pageprep (%s)", buf);
680680
memcpy(worker.bgw_function_name, CppAsString(worker_main), BGW_MAXLEN);

0 commit comments

Comments
 (0)