Skip to content

Commit 20661c1

Browse files
committed
Initialize t_self and t_tableOid in statext_expressions_load
The function is building a fake heap tuple, but left some of the header fields (tid and table OID) uninitialized. Per Coverity report. Reported-by: Ranier Vilela Discussion: https://postgr.es/m/CAEudQApj6h8tZ0-eP5Af5PKc5NG1YUc7=SdN_99YoHS51fKa0Q@mail.gmail.com
1 parent 60f1f09 commit 20661c1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/backend/statistics/extended_stats.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2420,6 +2420,8 @@ statext_expressions_load(Oid stxoid, int idx)
24202420

24212421
/* Build a temporary HeapTuple control structure */
24222422
tmptup.t_len = HeapTupleHeaderGetDatumLength(td);
2423+
ItemPointerSetInvalid(&(tmptup.t_self));
2424+
tmptup.t_tableOid = InvalidOid;
24232425
tmptup.t_data = td;
24242426

24252427
tup = heap_copytuple(&tmptup);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy