use safe fread() call

This commit is contained in:
Axel Kohlmeyer
2021-04-14 20:02:05 -04:00
parent 2a81411029
commit 6e739c04e4

View File

@ -1195,7 +1195,7 @@ void ReadRestart::check_eof_magic()
if (me == 0) {
long curpos = ftell(fp);
fseek(fp,(long)-n,SEEK_END);
fread(str,sizeof(char),n,fp);
utils::sfread(FLERR,str,sizeof(char),n,fp,nullptr,error);
fseek(fp,curpos,SEEK_SET);
}