diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index aa66eb331267c4..f2fc879f527633 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -877,6 +877,7 @@ bool SnapshotData::FromBlob(SnapshotData* out, FILE* in) { int err = fseek(in, 0, SEEK_END); CHECK_EQ(err, 0); size_t size = ftell(in); + CHECK_NE(size, static_cast(-1L)); err = fseek(in, 0, SEEK_SET); CHECK_EQ(err, 0);