Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 8322d6c

Browse filesBrowse files
committed
Do not form a tuple with unitialized area
1 parent 97441e1 commit 8322d6c
Copy full SHA for 8322d6c

File tree

2 files changed

+4
-0
lines changed
Filter options

2 files changed

+4
-0
lines changed

‎src/ruminsert.c

Copy file name to clipboardExpand all lines: src/ruminsert.c
+2Lines 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

Copy file name to clipboardExpand all lines: src/rumvacuum.c
+2Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.