Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 79e11d9

Browse files
committed
protect data read from pg_pathman's tables
1 parent c1bbebb commit 79e11d9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/init.c

+2
Original file line numberDiff line numberDiff line change
@@ -664,6 +664,7 @@ pathman_config_contains_relation(Oid relid, Datum *values, bool *isnull,
664664
/* Extract data if necessary */
665665
if (values && isnull)
666666
{
667+
htup = heap_copytuple(htup);
667668
heap_deform_tuple(htup, RelationGetDescr(rel), values, isnull);
668669

669670
/* Perform checks for non-NULL columns */
@@ -778,6 +779,7 @@ read_pathman_params(Oid relid, Datum *values, bool *isnull)
778779
if ((htup = heap_getnext(scan, ForwardScanDirection)) != NULL)
779780
{
780781
/* Extract data if necessary */
782+
htup = heap_copytuple(htup);
781783
heap_deform_tuple(htup, RelationGetDescr(rel), values, isnull);
782784
row_found = true;
783785

0 commit comments

Comments
 (0)