diff --git a/src/node_snapshotable.cc b/src/node_snapshotable.cc index 91cf46627ff781..197b67581e095b 100644 --- a/src/node_snapshotable.cc +++ b/src/node_snapshotable.cc @@ -867,6 +867,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);