From 28fc61848d5862bbd3ec304afe4b4e12d24c85a3 Mon Sep 17 00:00:00 2001 From: Roman Tsisyk <roman@tsisyk.com> Date: Mon, 26 Nov 2012 17:47:41 +0400 Subject: [PATCH] Check tuple cardinality when recovering from snapshots (see Bug#1082356) --- src/box/box.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/box/box.m b/src/box/box.m index fcb3d84f88..8d6668944c 100644 --- a/src/box/box.m +++ b/src/box/box.m @@ -270,6 +270,10 @@ recover_snap_row(struct tbuf *t) struct space *space = space_find(row->space); Index *index = space_index(space, 0); + /* Check to see if the tuple has a sufficient number of fields. */ + if (unlikely(tuple->field_count < space->max_fieldno)) { + tnt_raise(IllegalParams, :"tuple must have all indexed fields"); + } [index buildNext: tuple]; tuple_ref(tuple, 1); } -- GitLab