From d854e58d002993c6dc627c56bb9801d0e227e0ea Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Sat, 22 Jan 2022 16:51:07 -0500 Subject: [PATCH] add sanity check --- src/reader_native.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/reader_native.cpp b/src/reader_native.cpp index ba7a576a50..065adb5d01 100644 --- a/src/reader_native.cpp +++ b/src/reader_native.cpp @@ -130,6 +130,7 @@ void ReaderNative::skip() // read chunk and skip them read_buf(&nchunk, sizeof(int), 1); + if (nchunk < 0) error->one(FLERR,"Dump file is invalid or corrupted"); int n; for (int i = 0; i < nchunk; i++) {