Skip to content

Commit 8322d6c

Browse files
committed
Do not form a tuple with unitialized area
1 parent 97441e1 commit 8322d6c

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/ruminsert.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,8 @@ RumFormTuple(RumState * rumstate,
201201
{
202202
itup = repalloc(itup, newsize);
203203

204+
memset((char *) itup + IndexTupleSize(itup),
205+
0, newsize - IndexTupleSize(itup));
204206
/* set new size in tuple header */
205207
itup->t_info &= ~INDEX_SIZE_MASK;
206208
itup->t_info |= newsize;

src/rumvacuum.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,8 @@ RumFormTuple(RumState * rumstate,
182182
{
183183
itup = repalloc(itup, newsize);
184184

185+
memset((char *) itup + IndexTupleSize(itup),
186+
0, newsize - IndexTupleSize(itup));
185187
/* set new size in tuple header */
186188
itup->t_info &= ~INDEX_SIZE_MASK;
187189
itup->t_info |= newsize;

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