Skip to content

Commit 78ce882

Browse files
author
Artur Zakirov
committed
Sometimes copyItem could be uninitialized
1 parent 58fee28 commit 78ce882

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/rumdatapage.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,7 +884,7 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
884884
*/
885885
while(42)
886886
{
887-
int cmp;
887+
int cmp = 0;
888888

889889
/* get next item to copy if we pushed it on previous loop */
890890
if (copyItemEmpty == true && off <= maxoff)
@@ -932,7 +932,7 @@ dataPlaceToPage(RumBtree btree, Page page, OffsetNumber off)
932932
break;
933933
}
934934

935-
if (cmp <= 0)
935+
if (cmp <= 0 && ItemPointerIsValid(&copyItem.iptr))
936936
{
937937
ptr = rumPlaceToDataPageLeaf(ptr, btree->entryAttnum,
938938
&copyItem,

0 commit comments

Comments
 (0)