diff --git a/src/fix_property_atom.cpp b/src/fix_property_atom.cpp index 68440e4d58..24704a12ad 100644 --- a/src/fix_property_atom.cpp +++ b/src/fix_property_atom.cpp @@ -275,6 +275,7 @@ void FixPropertyAtom::read_data_section(char *keyword, int n, char *buf, tagint for (int i = 0; i < n; i++) { next = strchr(buf, '\n'); + if (!next) error->all(FLERR, "Unexpected end of file while reading data section"); *next = '\0'; try {