Add missing check to snapshot recovery

Reviewers: teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D2490
This commit is contained in:
Matej Ferencevic 2019-10-16 12:40:59 +02:00
parent e5a4a84de2
commit 842f0f3bf6

View File

@ -1110,6 +1110,7 @@ Durability::RecoveryInfo Durability::LoadSnapshot(
// Skip out edges.
auto out_size = snapshot.ReadUint();
if (!out_size) throw RecoveryFailure("Invalid snapshot data!");
for (uint64_t j = 0; j < *out_size; ++j) {
auto edge_gid = snapshot.ReadUint();
if (!edge_gid) throw RecoveryFailure("Invalid snapshot data!");