Skip to content

Commit dd1f645

Browse files
Fix AddressSanitizer use-after-scope complaint.
XLogRegisterBufData() does not copy data pointed to by caller's pointer argument. Oversight in commit 0d861bb. Author: Peter Eisentraut Reported-By: Peter Eisentraut Discussion: https://postgr.es/m/21800dbe-a13e-22f7-d423-b81db9d249f5@2ndquadrant.com
1 parent 30e82f1 commit dd1f645

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/access/nbtree/nbtinsert.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1289,6 +1289,7 @@ _bt_insertonpg(Relation rel,
12891289
xl_btree_metadata xlmeta;
12901290
uint8 xlinfo;
12911291
XLogRecPtr recptr;
1292+
uint16 upostingoff;
12921293

12931294
xlrec.offnum = newitemoff;
12941295

@@ -1354,7 +1355,7 @@ _bt_insertonpg(Relation rel,
13541355
* must reconstruct final itup (as well as nposting) using
13551356
* _bt_swap_posting().
13561357
*/
1357-
uint16 upostingoff = postingoff;
1358+
upostingoff = postingoff;
13581359

13591360
XLogRegisterBufData(0, (char *) &upostingoff, sizeof(uint16));
13601361
XLogRegisterBufData(0, (char *) origitup,

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