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:
parent
e5a4a84de2
commit
842f0f3bf6
@ -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!");
|
||||
|
Loading…
Reference in New Issue
Block a user